coreutils cleanup

Chris Staub chris at beaker67.com
Fri Mar 20 02:33:58 PDT 2009


Tobias Gasser wrote:
> 
> the root partition is mounted in
> [...]/coreutils-7.1/tests/cu-one-file-system.KqeMg6JYEx/a/b
> options rw,errors=continue,data=ordered (type=ext3)

Ah I'm sorry, you are right...there is something mounted in the 
Coreutils source dir. However, for me it's only something in /tmp, not 
/, and it has always been umounted when the testsuite ended. I'm going 
through Coreutils' testsuite scripts, and it looks like, by default, it 
tries using several dirs (/tmp, /var/tmp, /usr/tmp, $HOME) and tests to 
see if they're on a different partition - if not, it just skips the 
test. However, if any of those are on a different partition from the 
Coreutils' source dir, the test is run. Specifically, I believe it's the 
rm/one-file-system test that causes the issue you're seeing, though I'm 
not sure how. Here's what it looks like...

t=$other_partition_tmpdir
mkdir -p a/b $t/y
mount --bind $t a/b \
   || skip_test_ "This test requires mount with a working --bind option."

cat <<\EOF > exp || framework_failure
rm: skipping `a/b', since it's on a different device
EOF

fail=0

rm --one-file-system -rf a 2> out && fail=1
test -d $t/y || fail=1
umount $t


Right at the end it umounts the filesystem it mounted, so it looks like 
the only way it should still be there is if the test failed. I also 
don't see where it would use anything other than /tmp, /var/tmp, 
/usr/tmp, or $HOME, unless you set some variable that forces it to do so.

Of course, feel free to let me know if any of this is incorrect...



More information about the lfs-dev mailing list