]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-seccomp: accept ENOSYS from sysctl(2) too 17132/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 22 Sep 2020 17:05:17 +0000 (19:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Sep 2020 15:02:20 +0000 (17:02 +0200)
It seems that kernel 5.9 started returning that.

src/test/test-seccomp.c

index 697130e70c58a8386955658142c7904b6c4cf7a6..8831d87fe781c46592192c8cefb78b3e59e6e47e 100644 (file)
@@ -318,7 +318,7 @@ static void test_protect_sysctl(void) {
         if (pid == 0) {
 #if defined __NR__sysctl && __NR__sysctl >= 0
                 assert_se(syscall(__NR__sysctl, NULL) < 0);
-                assert_se(errno == EFAULT);
+                assert_se(IN_SET(errno, EFAULT, ENOSYS));
 #endif
 
                 assert_se(seccomp_protect_sysctl() >= 0);