summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-07-28 00:06:57 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-07-28 00:06:57 +0000
commit43309787ced3ec53d6cda5deaa55d75c712520cb (patch)
tree7c4745d99a8351831cf7e7c5ebdec49772f6cf77
parenteba892da258be5ca8c31135a1ea6171ae5cdda38 (diff)
downloadcoreutils-43309787ced3ec53d6cda5deaa55d75c712520cb.tar.xz
Don't assume that we can remove the working directory in tests.
-rw-r--r--ChangeLog5
-rwxr-xr-xtests/readlink/can-e10
-rwxr-xr-xtests/readlink/can-f10
-rwxr-xr-xtests/readlink/can-m10
4 files changed, 26 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 68762d505..ccec03a5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2004-07-27 Paul Eggert <eggert@cs.ucla.edu>
+ * tests/readlink/can-e: Don't assume that we can remove the
+ working directory: this isn't possible under Solaris 8, say.
+ * tests/readlink/can-f: Likewise.
+ * tests/readlink/can-m: Likewise.
+
* src/copy.c (copy_internal): find_backup_file_name no longer
returns NULL, so don't bother to check for this.
* src/cp.c (do_copy): Likewise.
diff --git a/tests/readlink/can-e b/tests/readlink/can-e
index 4e36c2f40..7d2eb43c0 100755
--- a/tests/readlink/can-e
+++ b/tests/readlink/can-e
@@ -39,9 +39,13 @@ fi
fail=1
while :; do
cd "$pwd/$tmp/removed" || break
- rmdir ../removed || break
- v=`readlink -e .` && break
- test -z "$v" || break
+
+ # Skip this test if the system doesn't let you remove the working directory.
+ if rmdir ../removed 2>/dev/null; then
+ v=`readlink -e .` && break
+ test -z "$v" || break
+ fi
+
cd "$pwd/$tmp" || break
fail=0
diff --git a/tests/readlink/can-f b/tests/readlink/can-f
index 3d76b2b1a..d71626df4 100755
--- a/tests/readlink/can-f
+++ b/tests/readlink/can-f
@@ -39,9 +39,13 @@ fi
fail=1
while :; do
cd "$pwd/$tmp/removed" || break
- rmdir ../removed || break
- v=`readlink -f .` && break
- test -z "$v" || break
+
+ # Skip this test if the system doesn't let you remove the working directory.
+ if rmdir ../removed 2>/dev/null; then
+ v=`readlink -f .` && break
+ test -z "$v" || break
+ fi
+
cd "$pwd/$tmp" || break
fail=0
diff --git a/tests/readlink/can-m b/tests/readlink/can-m
index cf2de5d52..757e3bcb6 100755
--- a/tests/readlink/can-m
+++ b/tests/readlink/can-m
@@ -39,9 +39,13 @@ fi
fail=1
while :; do
cd "$pwd/$tmp/removed" || break
- rmdir ../removed || break
- v=`readlink -m .` && break
- test -z "$v" || break
+
+ # Skip this test if the system doesn't let you remove the working directory.
+ if rmdir ../removed 2>/dev/null; then
+ v=`readlink -m .` && break
+ test -z "$v" || break
+ fi
+
cd "$pwd/$tmp" || break
fail=0