[SRU][Bionic][PATCH 1/1] Revert "selftests: skip seccomp get_metadata test if not real root"

Kleber Sacilotto de Souza kleber.souza at canonical.com
Thu Aug 22 13:34:42 UTC 2019

BugLink: https://bugs.launchpad.net/bugs/1840932

This reverts commit c33a23ff8ffcb8800bd2628f2af308a43496590f.

Commit upstream 3aa415dd2128 (selftests: skip seccomp get_metadata test if
not real root) depends on d057dc4e35e1 (seccomp: add a selftest for
get_metadata), but the latter has been reverted on bionic as part of
LP #1837664. The get_metadata testcase doesn't exist anymore, the backport
of the patch ended up changing syscall_restart instead.

Revert c33a23ff8ffc, which is not needed and is causing trouble.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
 tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 2a87ccf6ceae..ba15baa2061b 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -2680,12 +2680,6 @@ TEST(syscall_restart)
 	struct utsname utsbuf;
-	/* Only real root can get metadata. */
-	if (geteuid()) {
-		XFAIL(return, "get_metadata requires real root");
-		return;
-	}
 	ASSERT_EQ(0, pipe(pipefd));
 	child_pid = fork();

More information about the kernel-team mailing list