#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (renameat, int, (int, char const *, int, char const *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
do \
{ \
if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
+ { \
+ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ fflush (stderr); \
+ abort (); \
+ } \
} \
while (0)
ASSERT (unlink (BASE "sub2/file") == 0);
errno = 0;
ASSERT (renameat (dfd, BASE "sub2", dfd, BASE "sub1/.") == -1);
- ASSERT (errno == EINVAL || errno == EISDIR || errno == EBUSY);
+ ASSERT (errno == EINVAL || errno == EISDIR || errno == EBUSY
+ || errno == ENOTEMPTY);
errno = 0;
ASSERT (renameat (dfd, BASE "sub2/.", dfd, BASE "sub1") == -1);
ASSERT (errno == EINVAL || errno == EBUSY);