summaryrefslogtreecommitdiff
path: root/tests/ls/time-1
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-01-24 16:21:48 +0000
committerJim Meyering <jim@meyering.net>1998-01-24 16:21:48 +0000
commitbb964b3eec01a765751632cc9a8bf30a0968d5e1 (patch)
tree9ab9d1ed6d90823b441619700a5799b395ecde88 /tests/ls/time-1
parent638776e577a20514c7df33bdb3559d2d2f863b6d (diff)
downloadcoreutils-bb964b3eec01a765751632cc9a8bf30a0968d5e1.tar.xz
(test_failure): Note that the SunOS4.1.4 failure
of the ctime test is expected. Rename does not update ctime; link does -- so use ln, not mv.
Diffstat (limited to 'tests/ls/time-1')
-rwxr-xr-xtests/ls/time-120
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/ls/time-1 b/tests/ls/time-1
index 63bce5d71..c0b90226c 100755
--- a/tests/ls/time-1
+++ b/tests/ls/time-1
@@ -38,15 +38,18 @@ u3='1998-01-14 13:00'
$TOUCH -m -d "$t3" a || test_failure=1
$TOUCH -m -d "$t2" b || test_failure=1
-$TOUCH -m -d "$t1" d || test_failure=1
+$TOUCH -m -d "$t1" c || test_failure=1
$TOUCH -a -d "$u1" a || test_failure=1
$TOUCH -a -d "$u2" b || test_failure=1
-$TOUCH -a -d "$u3" d || test_failure=1
+$TOUCH -a -d "$u3" c || test_failure=1
+# Sleep so long in an attempt to avoid spurious failures
+# due to NFS caching and/or clock skew.
sleep 5
-mv d c || test_failure=1
+# Create a link, updating c's ctime.
+ln c d || test_failure=1
if test $test_failure = 1; then
echo 'failure in testing framework'
@@ -63,7 +66,16 @@ test "$*" = 'a b c' && : || fail=1
# C has newer ctime.
set `$LS -c a c`
-test "$*" = 'c a' && : || fail=1
+if test "$*" = 'c a'; then
+ : ok
+else
+ if test "$VERBOSE" = yes; then
+ # In spite of documentation, (e.g., stat(2)), neither link nor chmod
+ # update a file's st_ctime on SunOS4.1.4.
+ echo "failed ls ctime test -- this is expected at least for SunOS4.1.4" >&2
+ fi
+ fail=1
+fi
cd ..
rm -rf $tmp