2 # Test some of ls's sorting options.
4 if test "$VERBOSE" = yes; then
9 # Avoid any possible glitches due to daylight-saving changes near the
10 # time stamps used during the test.
14 # Avoid glitches due to the environment specifying `ls' styles.
21 mkdir $tmp || framework_failure=1
22 cd $tmp || framework_failure=1
32 touch -m -d "$t3" a || framework_failure=1
33 touch -m -d "$t2" b || framework_failure=1
34 touch -m -d "$t1" c || framework_failure=1
36 touch -a -d "$u3" c || framework_failure=1
37 touch -a -d "$u2" b || framework_failure=1
38 # Make sure A has ctime at least 1 second more recent than C's.
40 touch -a -d "$u1" a || framework_failure=1
44 # A has ctime more recent than C.
46 test "$*" = 'a c' || fail=1
48 # Sleep so long in an attempt to avoid spurious failures
49 # due to NFS caching and/or clock skew.
52 # Create a link, updating c's ctime.
53 ln c d || framework_failure=1
55 # Before we go any further, verify that touch's -m option works.
56 set -- `ls --full -l a`
58 *" $t3:00.000000000 +0000 a") ;;
60 # This might be what's making HPUX 11 systems fail this test.
62 A basic test of touch -m has just failed, so the subsequent
63 tests in this file will not be run.
65 In the output below, the date of last modification for \`a' should
74 # Now test touch's -a option.
75 set -- `ls --full -lu a`
77 *" $u1:00.000000000 +0000 a") ;;
79 # This might be what's making HPUX 11 systems fail this test.
81 A basic test of touch -a has just failed, so the subsequent
82 tests in this file will not be run.
84 In the output below, the date of last access for \`a' should
92 if test $framework_failure = 1; then
93 echo 'failure in testing framework'
98 test "$*" = 'c b a' && : || fail=1
99 test $fail = 1 && ls -l --full-time --time=access a b c
102 test "$*" = 'a b c' && : || fail=1
103 test $fail = 1 && ls -l --full-time a b c
105 # Now, C should have ctime more recent than A.
107 if test "$*" = 'c a'; then
110 # In spite of documentation, (e.g., stat(2)), neither link nor chmod
111 # update a file's st_ctime on SunOS4.1.4.
113 failed ls ctime test -- this failure is expected at least for SunOS4.1.4
114 and for tmpfs file systems on Solaris 5.5.1.
116 In the output below, `c' should have had a ctime more recent than
117 that of `a', but does not.
120 ls -ctl --full-time a c