- /* FIXME: Add tests of unlinkat(,0), and of fd instead of AT_FDCWD. */
- return test_rmdir_func (rmdirat);
+ /* FIXME: Add tests of fd other than ".". */
+ int result1;
+ int result2;
+
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
+ result1 = test_rmdir_func (rmdirat, false);
+ result2 = test_unlink_func (unlinker, false);
+ ASSERT (result1 == result2);
+ dfd = open (".", O_RDONLY);
+ ASSERT (0 <= dfd);
+ result2 = test_rmdir_func (rmdirat, false);
+ ASSERT (result1 == result2);
+ result2 = test_unlink_func (unlinker, false);
+ ASSERT (result1 == result2);
+ ASSERT (close (dfd) == 0);
+ if (result1 == 77)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return result1;