You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

From 16a09c0d879525707a03d3d7c6d3e659753b1e16 Mon Sep 17 00:00:00 2001
From: Steve Muckle <smuckle@google.com>
Date: Mon, 23 Oct 2017 17:24:47 -0700
Subject: [PATCH] seccomp: disable tests broken on kernels < 4.8
The skip_after_RET_TRACE, kill_after_RET_TRACE, skip_after_ptrace,
and kill_after_ptrace tests do not work on kernels earlier than 4.8.
Bug: 33027081
Test: run vts-kernel -m VtsKernelLinuxKselftestStaging
Change-Id: I3ac43d8ed9ca2a9e463001e72ca4dc5d72d81283
Signed-off-by: Steve Muckle <smuckle@google.com>
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 73f5ea6778ce..2c81f4b9965d 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -1530,6 +1530,11 @@ TEST_F(TRACE_syscall, syscall_dropped)
EXPECT_NE(self->mytid, syscall(__NR_gettid));
}
+/*
+ * TODO: b/33027081
+ * These tests do not work on kernels prior to 4.8.
+ */
+#ifndef __ANDROID__
TEST_F(TRACE_syscall, skip_after_RET_TRACE)
{
struct sock_filter filter[] = {
@@ -1653,6 +1658,7 @@ TEST_F_SIGNAL(TRACE_syscall, kill_after_ptrace, SIGSYS)
/* Tracer will redirect getpid to getppid, and we should die. */
EXPECT_NE(self->mypid, syscall(__NR_getpid));
}
+#endif
#ifndef __NR_seccomp
# if defined(__i386__)
--
2.16.0.rc1.238.g530d649a79-goog