]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid a false failure on AIX
authorPádraig Brady <P@draigBrady.com>
Sun, 23 Jul 2017 08:54:03 +0000 (01:54 -0700)
committerPádraig Brady <P@draigBrady.com>
Sun, 23 Jul 2017 19:23:31 +0000 (12:23 -0700)
* tests/misc/sync.sh: Normalize the error messages
when syncing a non read/write directory, as AIX
gives the "Is a directory" error.
Also ensure that sync(1) returns an error for this
case on all systems.

tests/misc/sync.sh

index 423c60655a00ed142b4b2daf85cb72e7eea21920..8ba27128767ec6af8066900ee46f8eabd41669bb 100755 (executable)
@@ -37,7 +37,9 @@ returns_ 1 sync file nofile || fail=1
 mkdir norw || framework_failure_
 chmod 0 norw || framework_failure_
 if ! test -r norw; then
-  sync norw 2>err
+  returns_ 1 sync norw 2>errt
+  # AIX gives "Is a directory"
+  sed 's/Is a directory/Permission denied/' <errt >err || framework_failure_
   printf "sync: error opening 'norw': Permission denied\n" >exp
   compare exp err || fail=1
 fi