2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Fujitsu. All Rights Reserved.
5 # FS QA Test No. btrfs/024
7 # btrfs wrong compression type regression test. This test is used to check
8 # the oops will happen when the users write some data into the files whose
9 # compress flag is set but the compression of the fs is disabled.
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
18 status=1 # failure is the default!
25 trap "_cleanup ; exit \$status" 0 1 2 3 15
27 # get standard environment, filters and checks
31 # real QA test starts here
37 work_file="$SCRATCH_MNT/tmpfile"
40 $CHATTR_PROG =c $work_file
41 $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io
44 echo "*** test compress=no"
45 _scratch_mkfs > /dev/null 2>&1
46 _scratch_mount "-o compress=no"
51 echo "*** test compress-force=no"
52 _scratch_mkfs > /dev/null 2>&1
53 _scratch_mount "-o compress-force=no"