]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* tests/ls/stat-dtype: Use stat to test file system type, rather
authorJim Meyering <jim@meyering.net>
Wed, 16 Aug 2006 09:44:55 +0000 (09:44 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 16 Aug 2006 09:44:55 +0000 (09:44 +0000)
than df -T, in case /etc/mtab lies.  Reported by Michael Stone.

ChangeLog
tests/ls/stat-dtype

index ee704fe3cef7b9f20f03114b020dc0807f488f40..f837918bf8ded0aa965d0ae88342f96456d20484 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 5148d5acda6676d77f79c00020d9b9ba8bb6ec21..f6a50fda8fb83856d89497e16905fea27ea34f21 100755 (executable)
@@ -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