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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
From e45a80f8628f60be23c2a8e0b1418c69b0835015 Mon Sep 17 00:00:00 2001
From: Edward Liaw <edliaw@google.com>
Date: Fri, 6 Oct 2023 18:46:00 +0000
Subject: [PATCH] seccomp_bpf: Disable incompatible tests
Bug: 147676645
Test: atest vts_linux_kselftest_x86_64:seccomp_seccomp_bpf_x86_64
Test: atest vts_linux_kselftest_arm_64:seccomp_seccomp_bpf_arm_64
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 110ca8bf8e2b..953876b81793 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -4488,6 +4488,13 @@ static char get_proc_stat(struct __test_metadata *_metadata, pid_t pid)
return status;
}
+/*
+ * b/147676645
+ * SECCOMP_IOCTL_NOTIF_RECV not compatible < 5.0
+ * SECCOMP_IOCTL_NOTIF_SEND not compatible < 5.0
+ * SECCOMP_FILTER_FLAG_NEW_LISTENER not compatible < 5.0
+ */
+#ifndef __ANDROID__
TEST(user_notification_fifo)
{
struct seccomp_notif_resp resp = {};
@@ -4566,6 +4573,7 @@ restart_wait:
EXPECT_EQ(0, WEXITSTATUS(status));
}
}
+#endif
/* get_proc_syscall - Get the syscall in progress for a given pid
*
@@ -4590,6 +4598,12 @@ static long get_proc_syscall(struct __test_metadata *_metadata, int pid)
return ret;
}
+/*
+ * b/147676645
+ * SECCOMP_FILTER_FLAG_NEW_LISTENER not compatible < 5.0
+ * SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV not compatible < 5.19
+ */
+#ifndef __ANDROID__
/* Ensure non-fatal signals prior to receive are unmodified */
TEST(user_notification_wait_killable_pre_notification)
{
@@ -4659,7 +4673,16 @@ TEST(user_notification_wait_killable_pre_notification)
EXPECT_EQ(read(sk_pair[0], &c, 1), 1);
}
+#endif
+/*
+ * b/147676645
+ * SECCOMP_IOCTL_NOTIF_RECV not compatible < 5.0
+ * SECCOMP_IOCTL_NOTIF_SEND not compatible < 5.0
+ * SECCOMP_FILTER_FLAG_NEW_LISTENER not compatible < 5.0
+ * SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV not compatible < 5.19
+ */
+#ifndef __ANDROID__
/* Ensure non-fatal signals after receive are blocked */
TEST(user_notification_wait_killable)
{
@@ -4738,7 +4761,15 @@ TEST(user_notification_wait_killable)
EXPECT_EQ(true, WIFEXITED(status));
EXPECT_EQ(0, WEXITSTATUS(status));
}
+#endif
+/*
+ * b/147676645
+ * SECCOMP_IOCTL_NOTIF_RECV not compatible < 5.0
+ * SECCOMP_FILTER_FLAG_NEW_LISTENER not compatible < 5.0
+ * SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV not compatible < 5.19
+ */
+#ifndef __ANDROID__
/* Ensure fatal signals after receive are not blocked */
TEST(user_notification_wait_killable_fatal)
{
@@ -4788,6 +4819,7 @@ TEST(user_notification_wait_killable_fatal)
EXPECT_EQ(true, WIFSIGNALED(status));
EXPECT_EQ(SIGTERM, WTERMSIG(status));
}
+#endif
/*
* TODO:
--
2.42.0.609.gbb76f46606-goog
|