mirror of
https://github.com/systemd/systemd.git
synced 2025-03-21 02:50:18 +03:00
test: parse_syscall_and_errno() accepts zero errno
This commit is contained in:
parent
17884f979a
commit
335171ca84
@ -72,6 +72,12 @@ static void test_parse_syscall_and_errno(void) {
|
||||
assert_se(e == 255);
|
||||
n = mfree(n);
|
||||
|
||||
/* 0 is also a valid errno. */
|
||||
assert_se(parse_syscall_and_errno("hoge:0", &n, &e) >= 0);
|
||||
assert_se(streq(n, "hoge"));
|
||||
assert_se(e == 0);
|
||||
n = mfree(n);
|
||||
|
||||
assert_se(parse_syscall_and_errno("hoge:kill", &n, &e) >= 0);
|
||||
assert_se(streq(n, "hoge"));
|
||||
assert_se(e == SECCOMP_ERROR_NUMBER_KILL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user