diff options
author | Jim Meyering <jim@meyering.net> | 2006-08-16 09:44:55 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-08-16 09:44:55 +0000 |
commit | 481113d5513b06bc5bcf7d75c38455e172deb719 (patch) | |
tree | 952c69a7cb977c32558520110afa93eaaa87a08d | |
parent | 4ce3538865d907c7cd4e5ac64109933f9201ccf3 (diff) | |
download | coreutils-481113d5513b06bc5bcf7d75c38455e172deb719.tar.xz |
* tests/ls/stat-dtype: Use stat to test file system type, rather
than df -T, in case /etc/mtab lies. Reported by Michael Stone.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | tests/ls/stat-dtype | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-08-16 Jim Meyering <jim@meyering.net> + + * tests/ls/stat-dtype: Use stat to test file system type, rather + than df -T, in case /etc/mtab lies. Reported by Michael Stone. + 2006-08-15 Paul Eggert <eggert@cs.ucla.edu> * NEWS: Mention that df exits with nonzero status if it generates diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index 5148d5acd..f6a50fda8 100755 --- a/tests/ls/stat-dtype +++ b/tests/ls/stat-dtype @@ -16,8 +16,9 @@ fi # linux-2.6.15, at least tmpfs and ext3 work, but reiserfs and xfs don't. # Also, tmpfs on Solaris 10 lacks d_type support. skip=yes -test `uname -s` = Linux && df -t tmpfs . > /dev/null 2>&1 && skip=no -df -t ext3 . > /dev/null 2>&1 && skip=no +fs_type=`stat -f --printf %T .` +test `uname -s` = Linux && test $fs_type = tmpfs && skip=no +test $fs_type = ext2/ext3 && skip=no test $skip = yes && { echo "$0: '.' is not on a suitable file system for this test" 1>&2 |