utimens-tests: port to NFS file systems
authorEric Blake <ebb9@byu.net>
Mon, 12 Oct 2009 16:42:35 +0000 (10:42 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 13 Oct 2009 02:57:50 +0000 (20:57 -0600)
commit420f3dbbb7343cb76a0c44b7c15b19dbe4aaeaaf
treee6c374ac36fbb654a6995863837e4ee754fd14a7
parent17090f6df956bccaa61b2b395c3df450ec49a6fe
utimens-tests: port to NFS file systems

Testing on Solaris 8 with NFS: creat() and utimens(,NULL) seem to
set timestamps according to the current time on the server, while
utimens(,{,UTIME_NOW}) sets timestamps according to the current
time on the client.  If two machines are not perfectly
synchronized in time, then this makes time appear to move
backwards.  Avoid spurious test failures caused by a mtime
comparison across machines, by instead doing 2 mtime comparisons,
each known to be from timestamps tied to a single machine.

* tests/test-utimens.h (test_utimens): Add a utimens call prior to
grabbing stat buffer.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
tests/test-utimens.h