fstests: move test group info to test files
[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 . ./common/preamble
10 _begin_fstest auto quick
11
12 # Import common functions.
13 . ./common/filter
14 . ./common/quota
15
16 # real QA test starts here
17
18 _supported_fs xfs
19
20 # we intentionally corrupt the filesystem, so don't check it after the test
21 _require_scratch_nocheck
22
23 # on success, we'll get a shutdown filesystem with a really noisy log message
24 # due to transaction cancellation.  Hence we don't want to check dmesg here.
25 _disable_dmesg_check
26
27 _require_xfs_mkfs_crc
28 _scratch_mkfs -m crc=0 > $seqres.full 2>&1
29
30 # The files that EIO in the golden output changes if we have quotas enabled
31 # so leave it off.
32 _qmount_option "defaults"
33
34 # corrupt an inode in the root inode chunk
35 root_ino=$(_scratch_xfs_get_metadata_field 'rootino' 'sb 0')
36 corrupt_ino=$((root_ino + 15))
37 _scratch_xfs_set_metadata_field 'core.mode' 0100644 "inode $corrupt_ino"
38
39 _scratch_mount
40
41 # The corrupt inode should be tripped over during these initial file creates.
42 touch $SCRATCH_MNT/file{0,1,2,3,4,5}{0,1,2,3,4,5} 2>&1 | _filter_scratch
43
44 # success, all done
45 status=0
46 exit