• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 16a09c0d879525707a03d3d7c6d3e659753b1e16 Mon Sep 17 00:00:00 2001
2From: Steve Muckle <smuckle@google.com>
3Date: Mon, 23 Oct 2017 17:24:47 -0700
4Subject: [PATCH] seccomp: disable tests broken on kernels < 4.8
5
6The skip_after_RET_TRACE, kill_after_RET_TRACE, skip_after_ptrace,
7and kill_after_ptrace tests do not work on kernels earlier than 4.8.
8
9Bug: 33027081
10Test: run vts-kernel -m VtsKernelLinuxKselftestStaging
11Change-Id: I3ac43d8ed9ca2a9e463001e72ca4dc5d72d81283
12Signed-off-by: Steve Muckle <smuckle@google.com>
13---
14 tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ++++++
15 1 file changed, 6 insertions(+)
16
17diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
18index 73f5ea6778ce..2c81f4b9965d 100644
19--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
20+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
21@@ -1530,6 +1530,11 @@ TEST_F(TRACE_syscall, syscall_dropped)
22 	EXPECT_NE(self->mytid, syscall(__NR_gettid));
23 }
24
25+/*
26+ * TODO: b/33027081
27+ * These tests do not work on kernels prior to 4.8.
28+ */
29+#ifndef __ANDROID__
30 TEST_F(TRACE_syscall, skip_after_RET_TRACE)
31 {
32 	struct sock_filter filter[] = {
33@@ -1653,6 +1658,7 @@ TEST_F_SIGNAL(TRACE_syscall, kill_after_ptrace, SIGSYS)
34 	/* Tracer will redirect getpid to getppid, and we should die. */
35 	EXPECT_NE(self->mypid, syscall(__NR_getpid));
36 }
37+#endif
38
39 #ifndef __NR_seccomp
40 # if defined(__i386__)
41--
422.16.0.rc1.238.g530d649a79-goog
43
44