[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-root tests in target check-root?

From: Jim Meyering
Subject: Re: non-root tests in target check-root?
Date: Mon, 02 Nov 2009 09:13:10 +0100

Voelker, Bernhard wrote:
> Jim Meyering wrote:
>> Voelker, Bernhard wrote:
>> > I'm wondering why there are so many tests (in coreutils-8.0( run by
>> >
>> >     sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root
>> >
>> > which are skipped with "must be run as non-root",
>> > e.g. touch/read-only, mv/perm-1, etc.
>> > Is that on purpose (to check wether the root check works;-) ?
>> It's because running them as root would fail,
>> due to the different way in which permissions work when
>> you are root; e.g., root can touch and write to a read-only file:
>>     # :>f; chmod 0 f; touch f; echo > f
>>     #
> thanks for the answer & sorry for the delay.
> That was clear to me, maybe my question was inprecise:
> If I understand the check* targets right, there is the general
> purpose target "check" which can be run as a non-root or a root user
> while there is a special target for root-only checks named "check-root".

Not quite.  I recommend against running "make check" as root.
There are very many tests, and while we're pretty confident
they contain few bugs and probably no *exploitable* bugs, it
is best to be cautious and run as few programs as possible when root.

Hence, "make check-root" serves to run the few tests
that can succeed only when run by root.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]