# HG changeset patch # User Bruno Haible # Date 1293293856 -3600 # Node ID 2d32f7c9e2d3f9f865ba3c9f01fcdd4188f5b20f # Parent 5e4ea8b4bde843eccc1aa4da4ae5db80d965e5f1 rename, renameat: Avoid test failures at NFS mounted locations. * tests/test-rename.h (assert_nonexistent): Remove the old directory, so that subsequent mkdir calls succeed. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-12-25 Bruno Haible + + rename, renameat: Avoid test failures at NFS mounted locations. + * tests/test-rename.h (assert_nonexistent): Remove the old directory, + so that subsequent mkdir calls succeed. + 2010-12-25 Bruno Haible iswblank: Fix C++ link error on Solaris 8. diff --git a/tests/test-rename.h b/tests/test-rename.h --- a/tests/test-rename.h +++ b/tests/test-rename.h @@ -56,11 +56,16 @@ if (stat (filename, &st) == -1) ASSERT (errno == ENOENT); else - /* But after renaming a directory over an empty directory on an NFS-mounted - file system, on Linux 2.6.18, for a period of 30 seconds the old - directory name is "present" according to stat() but "nonexistent" - according to dentry_exists(). */ - ASSERT (!dentry_exists (filename)); + { + /* But after renaming a directory over an empty directory on an NFS- + mounted file system, on Linux 2.6.18, for a period of 30 seconds the + old directory name is "present" according to stat() but "nonexistent" + according to dentry_exists(). */ + ASSERT (!dentry_exists (filename)); + /* Remove the old directory name, so that subsequent mkdir calls + succeed. */ + (void) rmdir (filename); + } } static int