[Top][All Lists]

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

Re: [PATCH] tests: adjust PATH to include /usr/sbin for filefrag-using t

From: Erik Auerswald
Subject: Re: [PATCH] tests: adjust PATH to include /usr/sbin for filefrag-using tests
Date: Wed, 23 Nov 2011 11:58:45 +0100
User-agent: Mutt/1.5.18 (2008-05-17)


On Wed, Nov 23, 2011 at 10:47:38AM +0100, Bernhard Voelker wrote:
> On 11/23/2011 10:17 AM, Jim Meyering wrote:
> > Bernhard Voelker wrote:
> >> Although my OpenSuSE system has e2fsprogs installed, the test
> >> fiemap-perf cannot use it, because /usr/sbin is missing in
> >> my (non-root) user's PATH:
> >>
> >>   fiemap-perf: skipped test: the `filefrag` utility is missing
> >>   SKIP: cp/fiemap-perf
> >>
> >> This is similar to the matter in commit
> >> 5eeaca942ab8fc090cd6b0ae2fede698dc9a6f5d.
> >>
> >> The attached patch fixing it (although I feel that we may
> >> need a more generic function require_sbin_tool_).
> > 
> > I have reservations about this, like I had for the other
> > commit you mention.  IMHO, that your sudo does not include /sbin
> > or /usr/sbin in PATH is a bug.
> > 
> > My first reaction is that every application should not be trying to work
> > around that bug.  That would be, in a way, condoning the bug.
> > The real way to work around it is on a system-wide basis.
> > 
> > Other opinions?
> Actually, I copied the "sudo" notice from the previous commit
> message - which you added ;-)
> I'm not using sudo, I just login to my PC as user "berny",
> then start an xterm, cd to the coreutils directory, and
> "make check".
> I wonder if other distributions include /usr/sbin and /sbin
> in a non-root user's PATH.

Ubuntu does include /sbin, /usr/sbin, and /usr/local/sbin in a non-root
user's path.

> Therefore I don't think it's a problem of the system, but
> more the behavior of coreutils tests to use administrative
> tools (those usually used by root and therefore in [/usr]/sbin).
> As a result, I think the test should either be run as root
> only (which is of course often not required) or care about
> having /usr/sbin and /sbin in the PATH when it's using such
> tools.

I'd say that's reasonable. The FHS states that

"Utilities used for system administration (and other root-only commands)
are stored in /sbin, /usr/sbin, and /usr/local/sbin."

Building software (e.g. coreutils) is not usually done with
an administrative account, thus PATH needs not contain the sbin
directories. If some test does require them, they should be added to
the PATH of that test.

That said, probably some of the sbin programs should rather be in bin,
because they are of use for regular users as well.


reply via email to

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