[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: Jim Meyering
Subject: Re: [PATCH] tests: adjust PATH to include /usr/sbin for filefrag-using tests
Date: Wed, 23 Nov 2011 10:17:06 +0100

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?

> Subject: [PATCH] tests: adjust PATH to include /usr/sbin for filefrag-using 
> tests
> * tests/init.cfg (require_filefrag_PATH_): New function to test whether
> filefrag is in PATH, otherwise adding /usr/sbin to PATH.  Needed for
> distributions (OpenSuSE) in which sudo does not include /usr/sbin in
> * tests/cp/fiemap-empty: Use require_filefrag_PATH_.
> * tests/cp/fiemap-perf: Likewise.
> * tests/cp/sparse-fiemap: Likewise.

reply via email to

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