summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-11-21 10:59:37 +0000
committerPádraig Brady <P@draigBrady.com>2015-11-21 11:03:14 +0000
commit56d3269207db13b0f3a594d6d2cbc52913929d21 (patch)
tree187ce40d13aeaeae5d4fd695101d183f908daf89
parentaccb18329df0dfef7b459d7db541b953c816e202 (diff)
downloadcoreutils-56d3269207db13b0f3a594d6d2cbc52913929d21.tar.xz
tests: avoid false failure on older NFS implementations
* tests/ls/stat-failed.sh: Skip the test if 'd' is returned as the type, and document where this was seen. Also flag failure to write small temp files during the test as an error rather than a failure. Fixes http://bugs.gnu.org/21130
-rwxr-xr-xtests/ls/stat-failed.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/ls/stat-failed.sh b/tests/ls/stat-failed.sh
index 002b71cf4..32e830476 100755
--- a/tests/ls/stat-failed.sh
+++ b/tests/ls/stat-failed.sh
@@ -31,7 +31,11 @@ chmod 600 d || framework_failure_
ls -Log d > out
test $? = 1 || fail=1
-cat <<\EOF > exp || fail=1
+# Linux 2.6.32 client with Isilon OneFS always returns d_type==DT_DIR ('d')
+# Newer Linux 3.10.0 returns the more correct DT_UNKNOWN ('?')
+grep '^[l?]?' out || skip_ 'unrecognized d_type returned'
+
+cat <<\EOF > exp || framework_failure_
total 0
?????????? ? ? ? s
EOF
@@ -42,7 +46,7 @@ sed 's/^l/?/' out | compare exp - || fail=1
rm -f out exp
returns_ $LS_MINOR_PROBLEM ls --dired -l d > out || fail=1
-cat <<\EOF > exp || fail=1
+cat <<\EOF > exp || framework_failure_
total 0
?????????? ? ? ? ? ? s
//DIRED// 44 45