bug-coreutils
[Top][All Lists]
Advanced

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

Port tests/rmdir/ignore away from GNU/Linux


From: Paul Eggert
Subject: Port tests/rmdir/ignore away from GNU/Linux
Date: Fri, 16 Nov 2007 01:21:43 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

tests/rmdir/ignore fails on Solaris 8, but this is due to a
portability bug in the test.  Here's a patch:

2007-11-16  Paul Eggert  <address@hidden>

        Port tests/rmdir/ignore away from GNU/Linux.
        * tests/rmdir/ignore: Don't assume that rmdir($PWD) will fail
        with errno==ENOTEMPTY when $PWD is not empty; Posix also allows
        rmdir to fail with errno==EBUSY.

diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore
index 5acc786..6ad8957 100755
--- a/tests/rmdir/ignore
+++ b/tests/rmdir/ignore
@@ -24,14 +24,14 @@ fi
 . $srcdir/../test-lib.sh

 cwd=`pwd`
-mkdir -p $cwd/a/b $cwd/x || framework_failure
+mkdir -p $cwd/a/b/c $cwd/a/x || framework_failure

 fail=0
-rmdir -p --ignore-fail-on-non-empty $cwd/a/b || fail=1
-# $cwd/x should remain
-test -d $cwd/x || fail=1
-# $cwd/{a,b} should be gone
-test -d $cwd/a && fail=1
+rmdir -p --ignore-fail-on-non-empty $cwd/a/b/c || fail=1
+# $cwd/a/x should remain
+test -d $cwd/a/x || fail=1
+# $cwd/a/b and $cwd/a/b/c should be gone
 test -d $cwd/a/b && fail=1
+test -d $cwd/a/b/c && fail=1

 exit $fail




reply via email to

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