X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-rmdir.h;h=bb7b3447291dbd7778da91a5280b22fef6991aa2;hb=ff4e8f6b53d7b8c53856ba8ba2adaad3251e6a88;hp=2470240049adb40196a88b00db374cc22c339d0b;hpb=3a5041b1c62c2b7c829f47bec2f1789c59844b6c;p=gnulib.git diff --git a/tests/test-rmdir.h b/tests/test-rmdir.h index 247024004..bb7b34472 100644 --- a/tests/test-rmdir.h +++ b/tests/test-rmdir.h @@ -19,10 +19,11 @@ /* This file is designed to test both rmdir(n) and unlinkat(AT_FDCWD,n,AT_REMOVEDIR). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that - appropriate headers are already included. */ + appropriate headers are already included. If PRINT, then warn + before returning status 77 when symlinks are unsupported. */ static int -test_rmdir_func (int (*func) (char const *name)) +test_rmdir_func (int (*func) (char const *name), bool print) { /* Remove any leftovers from a previous partial run. */ ASSERT (system ("rm -rf " BASE "*") == 0); @@ -78,8 +79,9 @@ test_rmdir_func (int (*func) (char const *name)) but not enough to penalize POSIX systems with an rpl_rmdir. */ if (symlink (BASE "dir", BASE "link") != 0) { - fputs ("skipping test: symlinks not supported on this filesystem\n", - stderr); + if (print) + fputs ("skipping test: symlinks not supported on this filesystem\n", + stderr); return 77; } ASSERT (mkdir (BASE "dir", 0700) == 0);