fstests: move test group info to test files
[xfstests-dev.git] / tests / ext4 / 047
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Fujitsu.  All Rights Reserved.
4 #
5 # FS QA Test 047
6 #
7 # This is a regression test for kernel patch:
8 # commit aa2f77920b74 ("ext4: disallow modifying DAX inode flag if inline_data has been set")
9
10 . ./common/preamble
11 _begin_fstest auto quick dax
12
13 # Import common functions.
14 . ./common/filter
15
16 # real QA test starts here
17 _supported_fs ext4
18 _require_scratch_dax_mountopt "dax=always"
19 _require_dax_iflag
20 _require_scratch_ext4_feature "inline_data"
21
22 TESTFILE=$SCRATCH_MNT/testfile
23
24 _scratch_mkfs_ext4 -O inline_data > $seqres.full 2>&1
25
26 _scratch_mount "-o dax=inode" >> $seqres.full 2>&1
27
28 echo "Need to make some inline data..." > $TESTFILE
29
30 # It's fine to disallow modifying DAX inode flag on the file which
31 # has inline_data flag.
32 if $XFS_IO_PROG -c "chattr +x" $TESTFILE >> $seqres.full 2>&1; then
33         _scratch_cycle_mount "dax=inode"
34         echo 'Append data' >> $TESTFILE
35 fi
36
37 # success, all done
38 echo "Silence is golden"
39 status=0
40 exit