957f3c4e5bb682b96b5055f1e22367e82f93a329
[xfstests-dev.git] / tests / xfs / 020
1 #! /bin/bash
2 # FS QA Test No. xfs/020
3 #
4 # Test segfault issue when repairing large xfs.
5 #
6 # Regression test for xfsprogs commit
7 # 7f2d6b8 xfs_repair: avoid segfault if reporting progress early in repair
8 #
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2014 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 tmp=/tmp/$$
33 status=1        # failure is the default!
34 trap "_cleanup; exit \$status" 0 1 2 3 15
35
36 _cleanup()
37 {
38     cd /
39     rm -f $tmp.*
40     rm -f $TEST_DIR/fsfile
41 }
42
43 # get standard environment, filters and checks
44 . ./common/rc
45 . ./common/filter
46
47 # real QA test starts here
48 _supported_fs xfs
49 _supported_os Linux
50 _require_test
51
52 echo "Silence is golden"
53
54 $MKFS_PROG -t xfs -d size=60t,file,name=$TEST_DIR/fsfile >/dev/null
55 $XFS_REPAIR_PROG -o ag_stride=32 -t 1 $TEST_DIR/fsfile >/dev/null 2>&1
56
57 status=$?
58 exit