From 43309787ced3ec53d6cda5deaa55d75c712520cb Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 28 Jul 2004 00:06:57 +0000
Subject: Don't assume that we can remove the working directory in tests.

---
 tests/readlink/can-f | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'tests/readlink/can-f')

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
-- 
cgit v1.2.3-70-g09d2