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
36 testfile=$TEST_DIR/testfile
41 time1=`_access_time $testfile | tee -a $seqres.full`
43 echo "sleep for $delay seconds"
44 sleep $delay # sleep to allow time to move on for access
46 time2=`_access_time $testfile | tee -a $seqres.full`
50 time3=`_access_time $testfile | tee -a $seqres.full`
52 delta1=`expr $time2 - $time1`
53 delta2=`expr $time3 - $time1`
55 # tolerate an atime up to 2s later than the ideal case
56 _within_tolerance "delta1" $delta1 $delay 0 2 -v
57 _within_tolerance "delta2" $delta2 $delta1 0 0 -v