2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
8 # - ensure it is persistent after unmount
9 # - check updated time by correct amount
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
29 # real QA test starts here
37 testfile=$TEST_DIR/testfile
42 time1=`_access_time $testfile | tee -a $seqres.full`
44 echo "sleep for $delay seconds"
45 sleep $delay # sleep to allow time to move on for access
47 time2=`_access_time $testfile | tee -a $seqres.full`
51 time3=`_access_time $testfile | tee -a $seqres.full`
53 delta1=`expr $time2 - $time1`
54 delta2=`expr $time3 - $time1`
56 # tolerate an atime up to 2s later than the ideal case
57 _within_tolerance "delta1" $delta1 $delay 0 2 -v
58 _within_tolerance "delta2" $delta2 $delta1 0 0 -v