X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-rmdir.h;h=476b307d1078c31cabb580ed3071cbd49d4752ca;hb=1aeca770e12bdc87d6cfe0e43cc2f37a910213a0;hp=5f1e955bea03bb1cc589d715bacba41140f71465;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/tests/test-rmdir.h b/tests/test-rmdir.h index 5f1e955be..476b307d1 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-2011 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); @@ -69,7 +66,8 @@ test_rmdir_func (int (*func) (char const *name), bool print) ASSERT (unlink (BASE "dir/file") == 0); errno = 0; ASSERT (func (BASE "dir/.//") == -1); - ASSERT (errno == EINVAL || errno == EBUSY); + ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST + || errno == ENOTEMPTY); ASSERT (func (BASE "dir") == 0); /* Test symlink behavior. Specifying trailing slash should remove