From: Zbigniew Jędrzejewski-Szmek Date: Tue, 22 Sep 2020 17:05:17 +0000 (+0200) Subject: test-seccomp: accept ENOSYS from sysctl(2) too X-Git-Tag: archive/raspbian/247.2-4+rpi1^2^2^2~21 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cabc615ed2c7f5373112eaef77a290a3ea9ae4be;p=systemd.git test-seccomp: accept ENOSYS from sysctl(2) too It seems that kernel 5.9 started returning that. (cherry picked from commit 0af05e485a3a88f454c714901eb6109307dc893e) Gbp-Pq: Name test-seccomp-accept-ENOSYS-from-sysctl-2-too.patch --- diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c index 051b5a27..3df60723 100644 --- a/src/test/test-seccomp.c +++ b/src/test/test-seccomp.c @@ -316,7 +316,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);