1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From 1890745bdb61f1fde95153ec1d98436836027c67 Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Date: Wed, 6 Nov 2024 09:31:25 +0100
Subject: [PATCH] Fix prctrl test on Alpha/sparc64.
Signed-off-by: Simon Josefsson <simon@josefsson.org>
---
tests/test_prctl.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/test_prctl.c b/tests/test_prctl.c
index 886abb4..f5b2975 100644
--- a/tests/test_prctl.c
+++ b/tests/test_prctl.c
@@ -61,7 +61,11 @@ static void test_prctl_PR_SET_SECCOMP_fail(void **state)
rc = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
assert_int_equal(rc, -1);
- assert_int_equal(errno, EFAULT);
+ /* alpha and sparc64 return EINVAL, which is OK for us. */
+ if (errno == EINVAL)
+ assert_int_equal(errno, EINVAL);
+ else
+ assert_int_equal(errno, EFAULT);
}
/* Once PR_SET_NO_NEW_PRIVS is set to 1, it cannot be reset to 0. */
--
2.46.0
|