summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-09-30 16:42:13 -0600
committerEric Blake <eblake@redhat.com>2010-10-01 10:43:41 -0600
commit9069af45e691d1252c727da66aa4f3f3c7f1ea29 (patch)
tree09371cf730f26806f6a45703e3b4989afff0f439 /tests
parentabe5c1f9bc09753fd79e7a121c8ecfa917dfaddb (diff)
downloadcoreutils-9069af45e691d1252c727da66aa4f3f3c7f1ea29.tar.xz
stat: print timestamps to full resolution
* src/stat.c (epoch_time): New function. (print_stat): Use it for %[WXYZ]. * NEWS: Document this. * tests/touch/60-seconds: Adjust test to match. * tests/misc/stat-birthtime: Likewise.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/stat-birthtime3
-rwxr-xr-xtests/touch/60-seconds2
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/misc/stat-birthtime b/tests/misc/stat-birthtime
index b54268c11..38e5d5947 100755
--- a/tests/misc/stat-birthtime
+++ b/tests/misc/stat-birthtime
@@ -28,8 +28,7 @@ ctime=$(stat --format %Z a) || fail=1
case $(stat --format %x a) in
*.000000000*) sleep 2;; # worst case file system is FAT
- *) # FIXME: sleep .1 would be sufficient if %X is fixed to show nanoseconds
- sleep 1;;
+ *) sleep .02;; # should be adequate for any system with subsecond resolution
esac
touch a || fail=1
diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds
index f858a309a..f98f0c5d1 100755
--- a/tests/touch/60-seconds
+++ b/tests/touch/60-seconds
@@ -23,7 +23,7 @@ fi
. $srcdir/test-lib.sh
-echo 60 > exp || framework_failure
+echo 60.000000000 > exp || framework_failure
# Before coreutils-7.7, this would fail, complaining of