bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coreutils readlink test case port to Solaris


From: Paul Eggert
Subject: coreutils readlink test case port to Solaris
Date: Tue, 27 Jul 2004 17:08:59 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I installed this patch to work around a portability problem with CVS
coreutils and Solaris 8.

2004-07-27  Paul Eggert  <address@hidden>

        * 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.

Index: tests/readlink/can-e
===================================================================
RCS file: /home/eggert/coreutils/cu/tests/readlink/can-e,v
retrieving revision 1.1
diff -p -u -r1.1 can-e
--- tests/readlink/can-e        6 Jul 2004 16:14:15 -0000       1.1
+++ tests/readlink/can-e        28 Jul 2004 00:02:34 -0000
@@ -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
Index: tests/readlink/can-f
===================================================================
RCS file: /home/eggert/coreutils/cu/tests/readlink/can-f,v
retrieving revision 1.1
diff -p -u -r1.1 can-f
--- tests/readlink/can-f        6 Jul 2004 16:14:15 -0000       1.1
+++ tests/readlink/can-f        28 Jul 2004 00:02:50 -0000
@@ -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
Index: tests/readlink/can-m
===================================================================
RCS file: /home/eggert/coreutils/cu/tests/readlink/can-m,v
retrieving revision 1.1
diff -p -u -r1.1 can-m
--- tests/readlink/can-m        6 Jul 2004 16:14:15 -0000       1.1
+++ tests/readlink/can-m        28 Jul 2004 00:03:02 -0000
@@ -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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]