summaryrefslogtreecommitdiff
path: root/tests/dd
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-06-13 11:33:10 +0100
committerPádraig Brady <P@draigBrady.com>2011-06-13 11:36:06 +0100
commite4feb5c03bb4122344050efe75325d432db5791c (patch)
tree567f2e479c48fefb2c6744e5c52687ed54febda3 /tests/dd
parent7c77c93dc5482d98b225242ea0300021ce6d4eae (diff)
downloadcoreutils-e4feb5c03bb4122344050efe75325d432db5791c.tar.xz
tests: avoid a false failure on HPUX systems
* tests/dd/nocache: Relax the test, as the system may return various errors from posix_fadvise(). HPUX 11.31 returns ENOTTY for example. Reported by Bruno Haible
Diffstat (limited to 'tests/dd')
-rwxr-xr-xtests/dd/nocache12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/dd/nocache b/tests/dd/nocache
index b5afabd35..0af165dc9 100755
--- a/tests/dd/nocache
+++ b/tests/dd/nocache
@@ -36,12 +36,12 @@ done
# Advise to drop cache for whole file
if ! dd if=ifile iflag=nocache count=0 2>err; then
- if grep -F 'Operation not supported' err >/dev/null; then
- warn_ 'skipping part; this file system lacks support for posix_fadvise()'
- skip=1
- else
- fail=1
- fi
+ # We could check for 'Operation not supported' in err here,
+ # but that was seen to be brittle. HPUX returns ENOTTY for example.
+ # So assume that if this basic operation fails, it's due to lack
+ # of support by the system.
+ warn_ 'skipping part; this file system lacks support for posix_fadvise()'
+ skip=1
fi
if test "$skip" != 1; then