]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-seccomp: arm64 does not have access() and poll() 6380/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 15 Jul 2017 19:30:48 +0000 (19:30 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 15 Jul 2017 21:18:22 +0000 (17:18 -0400)
glibc uses faccessat and ppoll, so just add a filters for that.

(cherry picked from commit abc0213839fef92e2e2b98a434914f22ece48490)

src/test/test-seccomp.c

index 50fe24c794c76763c13bd4cc3dda7190ae819dac..28fe2065072df4f77c629b71041daac0d8765338 100644 (file)
@@ -529,7 +529,11 @@ static void test_load_syscall_filter_set_raw(void) {
                 assert_se(poll(NULL, 0, 0) == 0);
 
                 assert_se(s = set_new(NULL));
+#if SCMP_SYS(access) >= 0
                 assert_se(set_put(s, UINT32_TO_PTR(__NR_access + 1)) >= 0);
+#else
+                assert_se(set_put(s, UINT32_TO_PTR(__NR_faccessat + 1)) >= 0);
+#endif
 
                 assert_se(seccomp_load_syscall_filter_set_raw(SCMP_ACT_ALLOW, s, SCMP_ACT_ERRNO(EUCLEAN)) >= 0);
 
@@ -541,7 +545,11 @@ static void test_load_syscall_filter_set_raw(void) {
                 s = set_free(s);
 
                 assert_se(s = set_new(NULL));
+#if SCMP_SYS(poll) >= 0
                 assert_se(set_put(s, UINT32_TO_PTR(__NR_poll + 1)) >= 0);
+#else
+                assert_se(set_put(s, UINT32_TO_PTR(__NR_ppoll + 1)) >= 0);
+#endif
 
                 assert_se(seccomp_load_syscall_filter_set_raw(SCMP_ACT_ALLOW, s, SCMP_ACT_ERRNO(EUNATCH)) >= 0);