Test that previous futimens change doesn't regress.
* tests/test-futimens.h (test_futimens): Also check for EBADF on
closed non-negative fd.
Signed-off-by: Eric Blake <eblake@redhat.com>
2011-09-19 Eric Blake <eblake@redhat.com>
+ futimens: enhance test
+ * tests/test-futimens.h (test_futimens): Also check for EBADF on
+ closed non-negative fd.
+
date: accept 'hence' as opposite of 'ago'
* lib/parse-datetime.y (relative_time_table): Add 'hence'.
* tests/test-parse-datetime.c (main): Enhance test.
errno = 0;
ASSERT (func (-1, NULL) == -1);
ASSERT (errno == EBADF);
+ {
+ int fd = dup (0);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+ errno = 0;
+ ASSERT (func (fd, NULL) == -1);
+ ASSERT (errno == EBADF);
+ }
{
struct timespec ts[2] = { { Y2K, UTIME_BOGUS_POS }, { Y2K, 0 } };
errno = 0;