From: Pádraig Brady
Date: Tue, 29 Nov 2016 21:15:59 +0000 (+0000)
Subject: tests: fix ERRORs and false FAILs on some platforms
X-Git-Tag: v8.26~3
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2bb79844fa9ef0a24a5930c88f6abd97180b9fa;p=thirdparty%2Fcoreutils.git
tests: fix ERRORs and false FAILs on some platforms
* tests/misc/ls-time.sh: Skip the test rather than ERROR
when `touch -m -d ...` fails (Hurd).
* tests/tail-2/follow-stdin.sh: Avoid false FAILs by ignoring
the variances in sterror output.
* tests/rm/rm-readdir-fail.sh: Likewise. Also avoid ERRORs
on systems that don't define _D_EXACT_NAMELEN.
---
diff --git a/tests/misc/ls-time.sh b/tests/misc/ls-time.sh
index 09a0fc180a..709a0034c0 100755
--- a/tests/misc/ls-time.sh
+++ b/tests/misc/ls-time.sh
@@ -71,7 +71,7 @@ In the output below, the date of last modification for 'a' should
have been $t3.
EOF
ls --full -l a
- framework_failure_
+ skip_ "touch -m -d '$t3' didn't work"
;;
esac
diff --git a/tests/rm/rm-readdir-fail.sh b/tests/rm/rm-readdir-fail.sh
index 91fb0f6490..7ea7da8bee 100755
--- a/tests/rm/rm-readdir-fail.sh
+++ b/tests/rm/rm-readdir-fail.sh
@@ -68,7 +68,7 @@ struct dirent *readdir (DIR *dirp)
count++;
d->d_name[0]='0'+count; d->d_name[1]='\0';
#ifdef _DIRENT_HAVE_D_NAMLEN
- _D_EXACT_NAMELEN(d)=2;
+ d->d_namlen = 2;
#endif
errno = 0;
return d;
@@ -89,7 +89,7 @@ export READDIR_PARTIAL
for READDIR_PARTIAL in '' '1'; do
rm -f preloaded
(export LD_PRELOAD=$LD_PRELOAD:./k.so
- returns_ 1 rm -Rf dir 2>>err) || fail=1
+ returns_ 1 rm -Rf dir 2>>errt) || fail=1
if ! test -f preloaded; then
cat err
skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
@@ -101,10 +101,10 @@ done
# Second case is more general error where we fail immediately
# (with ENOENT in this case but it could be anything).
cat <