diff mbox series

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

Message ID 20190822133442.7283-2-kleber.souza@canonical.com
State New
Headers show
Series Fix for ubuntu_kernel_selftests seccomp build failure (LP: #1840932) | expand

Commit Message

Kleber Sacilotto de Souza Aug. 22, 2019, 1:34 p.m. UTC
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@canonical.com>
---
 tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Thadeu Lima de Souza Cascardo Aug. 22, 2019, 1:40 p.m. UTC | #1
On Thu, Aug 22, 2019 at 03:34:42PM +0200, Kleber Sacilotto de Souza wrote:
> 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@canonical.com>

Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>

Shouldn't this be UBUNTU: SAUCE:, or at least refer to the upstream commit
3aa415dd2128e478ea3225b59308766de0e94d6b?

Cascardo.
Stefan Bader Aug. 22, 2019, 2:02 p.m. UTC | #2
On 22.08.19 15:34, Kleber Sacilotto de Souza wrote:
> 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@canonical.com>
Acked-by: Stefan Bader <stefan.bader@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;
>  #endif
>  
> -	/* Only real root can get metadata. */
> -	if (geteuid()) {
> -		XFAIL(return, "get_metadata requires real root");
> -		return;
> -	}
> -
>  	ASSERT_EQ(0, pipe(pipefd));
>  
>  	child_pid = fork();
>
Kleber Sacilotto de Souza Aug. 22, 2019, 2:07 p.m. UTC | #3
On 8/22/19 3:40 PM, Thadeu Lima de Souza Cascardo wrote:
> On Thu, Aug 22, 2019 at 03:34:42PM +0200, Kleber Sacilotto de Souza wrote:
>> BugLink: https://bugs.launchpad.net/bugs/1840932
>>
>> This reverts commit c33a23ff8ffcb8800bd2628f2af308a43496590f.
>>
>> Commit upstream 3aa415dd2128 (selftests: skip seccomp get_metadata test if

The upstream commit is mentioned here ^

>> 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@canonical.com>
> 
> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> 
> Shouldn't this be UBUNTU: SAUCE:, or at least refer to the upstream commit
> 3aa415dd2128e478ea3225b59308766de0e94d6b?

Since we don't have a upstream sha1 for the revert I agree we should probably
add 'UBUNTU: SAUCE:' to the subject.

Thanks,
Kleber
diff mbox series

Patch

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;
 #endif
 
-	/* Only real root can get metadata. */
-	if (geteuid()) {
-		XFAIL(return, "get_metadata requires real root");
-		return;
-	}
-
 	ASSERT_EQ(0, pipe(pipefd));
 
 	child_pid = fork();