[EMAIL PROTECTED] (Paul Jarc) wrote:
> Jim Meyering <[EMAIL PROTECTED]> wrote:
>>      * tests/rm/fail-2eperm: Now that we have setuidgid, use it in
>>      place of the kludge in this test.
>
> How about also using this to run the non-root-only tests when "make
> check" runs as root?

That was the goal.  But it was nontrivial since I wanted
to avoid having to change each of the 20+ affected tests.

I've changed priv-check to run

  exec setuidgid $NON_ROOT_USERNAME $0

in the require-non-root/UID=0 case.  A drawback with this approach
is that it requires that the user, $NON_ROOT_USERNAME, have write
access to each of the test directories -- in order to create each
per-test subdirectory.  But imho, that's not too onerous.
I usually unpack/build/test as a non-privileged user,
then run `sudo make check'.  With this change, I'd run
`sudo env NON_ROOT_USERNAME=$USER make check'.

> BTW, why are there three different ways of reporting this?
>
> ./fail-perm: NOTICE: This test case cannot be run as root.
> fail-eperm: you may not run this test as root;  skipping it.
> ./no-x: This test is being skipped, since it works only
> when run by an unprivileged user.

Because I didn't notice the duplication :-)
I've fixed them all to use the same code.
Thanks!


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to