]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Also accept the permission-denied diagnostic
authorJim Meyering <jim@meyering.net>
Fri, 7 Jun 2002 14:49:21 +0000 (14:49 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 7 Jun 2002 14:49:21 +0000 (14:49 +0000)
issued by some losing systems.  Reported by Volker Borchert.

tests/mv/part-fail

index dadadd2ff5773c15a9e59158cc26e3d538e1d93c..1915ccb3367ead09c060019d405d8009f4ad6449 100755 (executable)
@@ -41,7 +41,21 @@ cat <<EOF > exp
 mv: inter-device move failed: \`k' to \`$other_partition_tmpdir/k'; unable to remove target: Permission denied
 EOF
 
-cmp out exp || fail=1
+# On some (less-compliant) systems, we get EPERM in this case.
+# Accept either diagnostic.
+cat <<EOF > exp2
+mv: cannot move \`k' to \`$other_partition_tmpdir/k': Permission denied
+EOF
+
+if cmp out exp >/dev/null 2>&1; then
+  :
+else
+  if cmp out exp2; then
+    :
+  else
+    fail=1
+  fi
+fi
 test $fail = 1 && diff out exp 2> /dev/null
 
 (exit $fail); exit