This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] tunables: Fail tests correctly when setgid does not work
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 3 Feb 2017 20:07:05 -0500
- Subject: Re: [PATCH] tunables: Fail tests correctly when setgid does not work
- Authentication-results: sourceware.org; auth=none
- References: <1486060295-4624-1-git-send-email-siddhesh@sourceware.org>
On Thu, Feb 2, 2017 at 1:31 PM, Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
> The child process of the tst-env-setuid process was failing correctly
> with EXIT_UNSUPPORTED but the parent did not carry that status forward
> and failed instead. This patch fixes this so that tests on nosuid
> /tmp fails gracefully with UNSUPPORTED. Tested by making my tmpfs
> nosuid.
>
> * elf/tst-env-setuid.c (do_execve): Return EXIT_UNSUPPORTED in
> parent if child exited in that manner. Print WEXITSTATUS
> instead of the raw status.
> (do_test_prep): Rename to do_test.
> (do_test): Return the result of run_executable_sgid.
> (TEST_FUNCTION_ARGV): Adjust.
This works as expected.
Both tests are now UNSUPPORTED on my system where /tmp is mounted as nosuid.
For this test to pass I need to use a TMPDIR which is not nosuid.
Cheers,
Carlos.