xfs/029: filter out "extended-header: cycle: 1" from output
[xfstests-dev.git] / tests / xfs / 020
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Red Hat Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. xfs/020
6 #
7 # Test segfault issue when repairing large xfs.
8 #
9 # Regression test for xfsprogs commit
10 # 7f2d6b8 xfs_repair: avoid segfault if reporting progress early in repair
11 #
12 seq=`basename $0`
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1        # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     cd /
24     rm -f $tmp.*
25     rm -f $fsfile
26 }
27
28 # get standard environment, filters and checks
29 . ./common/rc
30 . ./common/filter
31
32 # real QA test starts here
33 _supported_fs xfs
34 _supported_os Linux
35 _require_test
36
37 # Writing a 60t fs requires about 2GB of space, so make sure
38 # we have plenty of space to do that.
39 _require_fs_space $TEST_DIR 2500000
40
41 echo "Silence is golden"
42
43 fsfile=$TEST_DIR/fsfile.$seq
44 rm -f $fsfile
45 # The actual truncate command is required here (and not xfs_io) because it
46 # returns nonzero if the operation fails.
47 truncate -s 60t $fsfile || _notrun "Cannot create 60T sparse file for test."
48 rm -f $fsfile
49
50 $MKFS_PROG -t xfs -d size=60t,file,name=$fsfile >/dev/null
51 $XFS_REPAIR_PROG -f -o ag_stride=32 -t 1 $fsfile >/dev/null 2>&1
52
53 status=$?
54 exit