2 # FS QA Test No. btrfs/024
4 # btrfs wrong compression type regression test. This test is used to check
5 # the oops will happen when the users write some data into the files whose
6 # compress flag is set but the compression of the fs is disabled.
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2013 Fujitsu. All Rights Reserved.
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License as
13 # published by the Free Software Foundation.
15 # This program is distributed in the hope that it would be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write the Free Software Foundation,
22 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #-----------------------------------------------------------------------
28 seqres=$RESULT_DIR/$seq
29 echo "QA output created by $seq"
34 status=1 # failure is the default!
41 trap "_cleanup ; exit \$status" 0 1 2 3 15
43 # get standard environment, filters and checks
47 # real QA test starts here
54 work_file="$SCRATCH_MNT/tmpfile"
58 $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io
61 echo "*** test nodatacow"
62 _scratch_mkfs > /dev/null 2>&1
63 _scratch_mount "-o nodatacow"
68 echo "*** test compress=no"
69 _scratch_mkfs > /dev/null 2>&1
70 _scratch_mount "-o compress=no"
75 echo "*** test compress-force=no"
76 _scratch_mkfs > /dev/null 2>&1
77 _scratch_mount "-o compress-force=no"