]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Accommodate the slightly different diagnostic we
authorJim Meyering <jim@meyering.net>
Sat, 22 Jun 2002 06:49:57 +0000 (06:49 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 22 Jun 2002 06:49:57 +0000 (06:49 +0000)
get on some systems, due to `unlink (dir)' failing with EACCES
rather than EPERM.  E.g. for ReiserFS on Linux-2.4.18.

tests/rm/rm1

index 8bcd6fd04a29795bc3beaf27ed1884e6f8781cb7..01dc3c2dfe4765ac3888e1da845a4946d7154154 100755 (executable)
@@ -34,7 +34,15 @@ cat <<\EOF > exp
 rm: cannot remove directory `b/a/p': Permission denied
 EOF
 
-cmp out exp || fail=1
+# On some systems, rm doesn't have enough information to
+# say it's a directory.
+cat <<\EOF > exp2
+rm: cannot remove `b/a/p': Permission denied
+EOF
+
+cmp out exp > /dev/null 2>&1 || {
+  cmp out exp2 || fail=1
+  }
 test $fail = 1 && diff out exp 2> /dev/null
 
 test -d b/a/p || fail=1