From: Jim Meyering Date: Sat, 24 Jan 1998 16:21:48 +0000 (+0000) Subject: (test_failure): Note that the SunOS4.1.4 failure X-Git-Tag: FILEUTILS-3_16l~23 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=bb964b3eec01a765751632cc9a8bf30a0968d5e1;p=thirdparty%2Fcoreutils.git (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. --- diff --git a/tests/ls/time-1 b/tests/ls/time-1 index 63bce5d71a..c0b90226c9 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