xfs/419: remove irrelevant swapfile test
[xfstests-dev.git] / tests / xfs / 132
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 132
6 #
7 # Catch inobt/on disk inode free state mismatches on V4 filesystems
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1        # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         cd /
21         rm -f $tmp.*
22 }
23
24 # get standard environment, filters and checks
25 . ./common/rc
26 . ./common/filter
27 . ./common/quota
28
29 # remove previous $seqres.full before test
30 rm -f $seqres.full
31
32 # real QA test starts here
33
34 _supported_fs xfs
35
36 # we intentionally corrupt the filesystem, so don't check it after the test
37 _require_scratch_nocheck
38
39 # on success, we'll get a shutdown filesystem with a really noisy log message
40 # due to transaction cancellation.  Hence we don't want to check dmesg here.
41 _disable_dmesg_check
42
43 _require_xfs_mkfs_crc
44 _scratch_mkfs -m crc=0 > $seqres.full 2>&1
45
46 # The files that EIO in the golden output changes if we have quotas enabled
47 # so leave it off.
48 _qmount_option "defaults"
49
50 # corrupt an inode in the root inode chunk
51 root_ino=$(_scratch_xfs_get_metadata_field 'rootino' 'sb 0')
52 corrupt_ino=$((root_ino + 15))
53 _scratch_xfs_set_metadata_field 'core.mode' 0100644 "inode $corrupt_ino"
54
55 _scratch_mount
56
57 # The corrupt inode should be tripped over during these initial file creates.
58 touch $SCRATCH_MNT/file{0,1,2,3,4,5}{0,1,2,3,4,5} 2>&1 | _filter_scratch
59
60 # success, all done
61 status=0
62 exit