Skip part of this test when "." is not a local file system.
authorJim Meyering <jim@meyering.net>
Tue, 20 Mar 2007 15:47:36 +0000 (16:47 +0100)
committerJim Meyering <jim@meyering.net>
Tue, 20 Mar 2007 15:47:36 +0000 (16:47 +0100)
* tests/mkdir/p-3: Likewise.

ChangeLog
tests/mkdir/p-3

index e8d3573..c529ef6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        Skip part of this test when "." is not a local file system.
        * tests/install/basic-1: Otherwise, it would fail on some NFS
        file systems.
+       * tests/mkdir/p-3: Likewise.
 
 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
 
index 5c2a76a..54e99e1 100755 (executable)
@@ -54,9 +54,13 @@ test -d "$p/b/b" && test -d "$p/z" || fail=1
 
 # Same as above, but a trailing relative name in an unreadable directory
 # whose parent is inaccessible.  coreutils 5.97 fails this test.
-(cd no-acce3s/d && chmod a-r . && chmod a-rx .. && mkdir -p a/b "$p/b/c" d/e &&
- test -d a/b && test -d d/e) || fail=1
-test -d "$p/b/c" || fail=1
+# Perform this test only if "." is on a local file system.
+# Otherwise, it would fail e.g., on an NFS-mounted file system.
+if df --local . >/dev/null 2>&1; then
+  (cd no-acce3s/d && chmod a-r . && chmod a-rx .. &&
+      mkdir -p a/b "$p/b/c" d/e && test -d a/b && test -d d/e) || fail=1
+  test -d "$p/b/c" || fail=1
+fi
 
 b=`ls "$p/a" | tr -d '\n'`
 # With coreutils-5.3.0, this would fail with $b=bu.