[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-8.12.193-d8dc8: 2 tests skipped: failed to create ext2 fil
From: |
Jim Meyering |
Subject: |
Re: coreutils-8.12.193-d8dc8: 2 tests skipped: failed to create ext2 file system |
Date: |
Tue, 06 Sep 2011 22:58:38 +0200 |
Bernhard Voelker wrote:
> These 2 root checks fail because my USER doesn't have /sbin nor /usr/sbin in
> PATH.
I'd say they were skipped, not failed :-)
> SKIP: cp/cp-mv-enotsup-xattr (exit: 77)
> =======================================
>
> + dd if=/dev/zero of=noxattr.bin bs=8192 count=200
> + mkdir noxattr
> + mkfs -t ext2 -F noxattr.bin
> ./cp/cp-mv-enotsup-xattr: line 41: mkfs: command not found
> + skip_ 'failed to create ext2 file system'
> + warn_ 'cp-mv-enotsup-xattr: skipped test: failed to create ext2 file system'
>
> SKIP: rm/read-only (exit: 77)
> =============================
> ...
> + dd if=/dev/zero of=blob bs=8192 count=200
> + mkdir mnt
> + mkfs -t ext2 -F blob
> ./rm/read-only: line 31: mkfs: command not found
> + skip_ 'failed to create ext2 file system'
> + warn_ 'read-only: skipped test: failed to create ext2 file system'
>
>
> If started with
> sudo env PATH="/sbin:$PATH" NON_ROOT_USERNAME=$USER make -k check-root
> then they pass.
>
> Should we
> * add /sbin to PATH for the whole check-root test suite, or
> * add it only for these 2 tests, or
> * enhance the README file for this issue?
IMHO, having a usable PATH is a prerequisite.
If root's default search path lacks /sbin, you may want to
take that up with the folks who manage your distribution.
It's something that affects many packages, not just coreutils.
Saying something like that in README would be sort of like saying you must
have a user name. While it is possible to do a lot of things with just
a numeric user ID, many tools require that you also have a corresponding
user name. It's so basic that no one should have to bother to check or
warn about the possibility that the assumption does not hold.
Skipping a few tests is not a problem.
In spite of all that, I think that enough people would skip these tests
that it's worth addressing. In case you're interested, here's the sort
of patch I'd like:
Add a function in tests/init.cfg named something like
require_mkfs_PATH_ that does this:
if there is no mkfs in PATH
if PATH does not contain /sbin
if /sbin/mkfs is executable
PATH=$PATH:/sbin
Then, invoke that new function from each of the two tests above
to make it less likely that they'll be skipped.