summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-10-08 15:57:06 -0600
committerEric Blake <ebb9@byu.net>2009-10-10 15:16:52 -0600
commit7280a913a12ebfe33e8cad1b217b84944bbd3681 (patch)
treee5492e485e56314c073cff40b99b34c3ea88a305 /tests
parent7ff00ca82f134880b2aa751de96756b46a895ae1 (diff)
downloadcoreutils-7280a913a12ebfe33e8cad1b217b84944bbd3681.tar.xz
copy: allow symlink timestamp preservation on more systems
* src/copy.c (utimens_symlink): Simplify by using lutimens. * m4/jm-macros.m4 (coreutils_MACROS): Drop utimensat; gnulib does this for us. * tests/cp/preserve-slink-time: Recognize lutimes support.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp/preserve-slink-time2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time
index c5c21a5e1..407b77272 100755
--- a/tests/cp/preserve-slink-time
+++ b/tests/cp/preserve-slink-time
@@ -24,6 +24,7 @@ fi
. $srcdir/test-lib.sh
grep '^#define HAVE_UTIMENSAT' "$CONFIG_HEADER" > /dev/null ||
+grep '^#define HAVE_LUTIMES' "$CONFIG_HEADER" > /dev/null ||
skip_test_ 'this system lacks the utimensat function'
ln -s no-such dangle || framework_failure
@@ -34,6 +35,7 @@ case $(stat --format=%y dangle) in
??:??:??.000000000) sleep 2;;
esac
+# Can't use --format=%x, as lstat() modifies atime on some platforms.
cp -Pp dangle d2 || framework_failure
stat --format=%y dangle > t1 || framework_failure
stat --format=%y d2 > t2 || framework_failure