fstests: use _require_symlinks on all necessary tests
[xfstests-dev.git] / tests / generic / 313
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 313
6 #
7 # Check ctime and mtime are updated on truncate(2) and ftruncate(2)
8 #
9 # Regression test for commit:
10 # 3972f26 btrfs: update timestamps on truncate()
11 #
12 seq=`basename $0`
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 status=1        # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
19
20 _cleanup()
21 {
22     cd /
23     rm -f $testfile
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28 . ./common/filter
29
30 # real QA test starts here
31 _supported_fs generic
32 _supported_os Linux
33 _require_test
34
35 testfile=$TEST_DIR/testfile.$seq
36
37 echo "Silence is golden"
38
39 $here/src/t_truncate_cmtime $testfile 2>&1
40
41 status=0
42 exit