projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
maint: update copyright
[gnulib.git]
/
tests
/
test-fdutimensat.c
diff --git
a/tests/test-fdutimensat.c
b/tests/test-fdutimensat.c
index
d94667a
..
81ce3f5
100644
(file)
--- a/
tests/test-fdutimensat.c
+++ b/
tests/test-fdutimensat.c
@@
-1,5
+1,5
@@
/* Tests of fdutimensat.
/* Tests of fdutimensat.
- Copyright (C) 2009
, 2010
Free Software Foundation, Inc.
+ Copyright (C) 2009
-2014
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
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
@@
-48,12
+48,17
@@
static int
do_fdutimens (char const *name, struct timespec const times[2])
{
int result;
do_fdutimens (char const *name, struct timespec const times[2])
{
int result;
+ int nofollow_result;
+ int nofollow_errno;
int fd = openat (dfd, name, O_WRONLY);
if (fd < 0)
fd = openat (dfd, name, O_RDONLY);
errno = 0;
int fd = openat (dfd, name, O_WRONLY);
if (fd < 0)
fd = openat (dfd, name, O_RDONLY);
errno = 0;
+ nofollow_result = fdutimensat (fd, dfd, name, times, AT_SYMLINK_NOFOLLOW);
+ nofollow_errno = errno;
result = fdutimensat (fd, dfd, name, times, 0);
result = fdutimensat (fd, dfd, name, times, 0);
- ASSERT (fdutimensat (fd, dfd, name, times, AT_SYMLINK_NOFOLLOW) == result);
+ ASSERT (result == nofollow_result
+ || (nofollow_result == -1 && nofollow_errno == ENOSYS));
if (0 <= fd)
{
int saved_errno = errno;
if (0 <= fd)
{
int saved_errno = errno;