X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-rmdir.h;h=b2411a2d504aa3355998c437793b399f08590f58;hb=2d91a71b4af88ffea2bf5cf9a18e2f803ecba537;hp=bb7b3447291dbd7778da91a5280b22fef6991aa2;hpb=ff4e8f6b53d7b8c53856ba8ba2adaad3251e6a88;p=gnulib.git diff --git a/tests/test-rmdir.h b/tests/test-rmdir.h index bb7b34472..b2411a2d5 100644 --- a/tests/test-rmdir.h +++ b/tests/test-rmdir.h @@ -1,5 +1,5 @@ /* Tests of rmdir. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,9 +25,6 @@ static int test_rmdir_func (int (*func) (char const *name), bool print) { - /* Remove any leftovers from a previous partial run. */ - ASSERT (system ("rm -rf " BASE "*") == 0); - /* Setup. */ ASSERT (mkdir (BASE "dir", 0700) == 0); ASSERT (close (creat (BASE "dir/file", 0600)) == 0); @@ -68,8 +65,9 @@ test_rmdir_func (int (*func) (char const *name), bool print) /* Empty directory. */ ASSERT (unlink (BASE "dir/file") == 0); errno = 0; - ASSERT (func (BASE "dir/./") == -1); - ASSERT (errno == EINVAL || errno == EBUSY); + ASSERT (func (BASE "dir/.//") == -1); + ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST + || errno == ENOTEMPTY); ASSERT (func (BASE "dir") == 0); /* Test symlink behavior. Specifying trailing slash should remove @@ -80,8 +78,8 @@ test_rmdir_func (int (*func) (char const *name), bool print) if (symlink (BASE "dir", BASE "link") != 0) { if (print) - fputs ("skipping test: symlinks not supported on this filesystem\n", - stderr); + fputs ("skipping test: symlinks not supported on this file system\n", + stderr); return 77; } ASSERT (mkdir (BASE "dir", 0700) == 0);