generic/405: test mkfs against thin provision device
[xfstests-dev.git] / tests / generic / 313
1 #! /bin/bash
2 # FS QA Test No. 313
3 #
4 # Check ctime and mtime are updated on truncate(2) and ftruncate(2)
5 #
6 # Regression test for commit:
7 # 3972f26 btrfs: update timestamps on truncate()
8 #
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2013 Red Hat, Inc.  All Rights Reserved.
11 #
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License as
14 # published by the Free Software Foundation.
15 #
16 # This program is distributed in the hope that it would be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write the Free Software Foundation,
23 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24 #-----------------------------------------------------------------------
25 #
26
27 seq=`basename $0`
28 seqres=$RESULT_DIR/$seq
29 echo "QA output created by $seq"
30
31 here=`pwd`
32 status=1        # failure is the default!
33 trap "_cleanup; exit \$status" 0 1 2 3 15
34
35 _cleanup()
36 {
37     cd /
38     rm -f $testfile
39 }
40
41 # get standard environment, filters and checks
42 . ./common/rc
43 . ./common/filter
44
45 # real QA test starts here
46 _supported_fs generic
47 _supported_os IRIX Linux
48 _require_test
49
50 testfile=$TEST_DIR/testfile.$seq
51
52 echo "Silence is golden"
53
54 $here/src/t_truncate_cmtime $testfile 2>&1
55
56 status=0
57 exit