2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2010 FUJITSU LIMITED. All Rights Reserved.
7 # Check ctime updated or not if file linked
8 # See also http://marc.info/?l=linux-btrfs&m=127434439020230&w=2
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
23 # get standard environment, filters and checks
26 # real QA test starts here
33 # create a file and get its ctime
35 ctime=`stat -c %Z $TEST_DIR/ouch`
38 # create a link to a file and get existing file's ctime
39 link $TEST_DIR/ouch $TEST_DIR/ouch2
40 ctime2=`stat -c %Z $TEST_DIR/ouch`
43 if [ $ctime2 -le $ctime ]; then
44 echo "ctime: $ctime -> $ctime2 "
45 echo "Fatal error: ctime not updated after link"