forked from Minki/linux
selftests/seccomp: Rename XFAIL to SKIP
The kselftests will be renaming XFAIL to SKIP in the test harness, and to avoid painful conflicts, rename XFAIL to SKIP now in a future-proofed way. Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
b3a9e3b962
commit
8b1bc88c3c
@ -52,6 +52,11 @@
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
|
||||
/* Attempt to de-conflict with the selftests tree. */
|
||||
#ifndef SKIP
|
||||
#define SKIP(s, ...) XFAIL(s, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef PR_SET_PTRACER
|
||||
# define PR_SET_PTRACER 0x59616d61
|
||||
#endif
|
||||
@ -3068,7 +3073,7 @@ TEST(get_metadata)
|
||||
|
||||
/* Only real root can get metadata. */
|
||||
if (geteuid()) {
|
||||
XFAIL(return, "get_metadata requires real root");
|
||||
SKIP(return, "get_metadata requires real root");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3111,7 +3116,7 @@ TEST(get_metadata)
|
||||
ret = ptrace(PTRACE_SECCOMP_GET_METADATA, pid, sizeof(md), &md);
|
||||
EXPECT_EQ(sizeof(md), ret) {
|
||||
if (errno == EINVAL)
|
||||
XFAIL(goto skip, "Kernel does not support PTRACE_SECCOMP_GET_METADATA (missing CONFIG_CHECKPOINT_RESTORE?)");
|
||||
SKIP(goto skip, "Kernel does not support PTRACE_SECCOMP_GET_METADATA (missing CONFIG_CHECKPOINT_RESTORE?)");
|
||||
}
|
||||
|
||||
EXPECT_EQ(md.flags, SECCOMP_FILTER_FLAG_LOG);
|
||||
@ -3672,7 +3677,7 @@ TEST(user_notification_continue)
|
||||
resp.val = 0;
|
||||
EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0) {
|
||||
if (errno == EINVAL)
|
||||
XFAIL(goto skip, "Kernel does not support SECCOMP_USER_NOTIF_FLAG_CONTINUE");
|
||||
SKIP(goto skip, "Kernel does not support SECCOMP_USER_NOTIF_FLAG_CONTINUE");
|
||||
}
|
||||
|
||||
skip:
|
||||
@ -3680,7 +3685,7 @@ skip:
|
||||
EXPECT_EQ(true, WIFEXITED(status));
|
||||
EXPECT_EQ(0, WEXITSTATUS(status)) {
|
||||
if (WEXITSTATUS(status) == 2) {
|
||||
XFAIL(return, "Kernel does not support kcmp() syscall");
|
||||
SKIP(return, "Kernel does not support kcmp() syscall");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user