File 0006-test-seccomp-arm64-does-not-have-access-and-poll.patch of Package systemd-v234-testsuite

From a049f9a22204f06fe80f400ea5333bea80e9a4f0 Mon Sep 17 00:00:00 2001
From: Thomas Blume <thomas.blume@suse.com>
Date: Tue, 22 Jan 2019 11:13:40 +0100
Subject: [PATCH 06/11] test-seccomp: arm64 does not have access() and poll()

glibc uses faccessat and ppoll, so just add a filters for that.

(cherry picked from commit abc0213839fef92e2e2b98a434914f22ece48490)
---
 src/test/test-seccomp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
index 50fe24c794..28fe206507 100644
--- a/src/test/test-seccomp.c
+++ b/src/test/test-seccomp.c
@@ -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);
 
-- 
2.16.4

openSUSE Build Service is sponsored by