summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xtests/ls/stat-dtype13
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d2e604d5b..152e31d30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-24 Jim Meyering <jim@meyering.net>
+
+ * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
+ since that predated addition of d_type support.
+
2006-09-23 Jim Meyering <jim@meyering.net>
* gl/modules/getloadavg.diff: New file. Work around the way the latest
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype
index dad455215..153195cd3 100755
--- a/tests/ls/stat-dtype
+++ b/tests/ls/stat-dtype
@@ -37,7 +37,18 @@ fi
# Also, tmpfs on Solaris 10 lacks d_type support.
skip=yes
fs_type=`stat -f --printf %T .`
-test `uname -s` = Linux && test $fs_type = tmpfs && skip=no
+
+linux_2_6_or_newer=0
+case `uname -r` in
+ [01].*) ;;
+ 2.[0-5]*) ;;
+ *) linux_2_6_or_newer=1 ;;
+esac
+
+test `uname -s` = Linux \
+ && test $linux_2_6_or_newer = 1 \
+ && test $fs_type = tmpfs \
+ && skip=no
test $fs_type = ext2/ext3 && skip=no
test $skip = yes &&
{