]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Skip part of this test when "." is not a local file system.
authorJim Meyering <jim@meyering.net>
Tue, 20 Mar 2007 12:26:28 +0000 (13:26 +0100)
committerJim Meyering <jim@meyering.net>
Tue, 20 Mar 2007 12:26:28 +0000 (13:26 +0100)
* tests/install/basic-1: Otherwise, it would fail on some NFS
file systems.

ChangeLog
tests/install/basic-1

index 52eb7baec0e598a05df17f0e6681576950750a56..e47f4bfa54ad9d6cad8d7f176961c72ef0195f5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-20  Jim Meyering  <jim@meyering.net>
+
+       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.
+
 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
index 78a8375520e1616cae15e0d339f011b1515926fa..3270604049fefadb270c05ea426c1c508bb4d9e4 100755 (executable)
@@ -129,13 +129,17 @@ test -d xx/rel && fail=1
 
 # Test that we can install from an unreadable directory with an
 # inaccessible parent.  coreutils 5.97 fails this test.
-mkdir -p sub1/d || fail=1
-(cd sub1/d && chmod a-r . && chmod a-rx .. &&
- ginstall -d "$abs/xx/zz" rel/a rel/b) || fail=1
-chmod 755 sub1 sub1/d || fail=1
-test -d xx/zz || fail=1
-test -d sub1/d/rel/a || fail=1
-test -d sub1/d/rel/b || 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
+  mkdir -p sub1/d || fail=1
+  (cd sub1/d && chmod a-r . && chmod a-rx .. &&
+   ginstall -d "$abs/xx/zz" rel/a rel/b) || fail=1
+  chmod 755 sub1 sub1/d || fail=1
+  test -d xx/zz || fail=1
+  test -d sub1/d/rel/a || fail=1
+  test -d sub1/d/rel/b || fail=1
+fi
 
 touch file || fail=1
 ginstall -Dv file sub3/a/b/c/file >out 2>&1 || fail=1