xfs/530: skip test if user MKFS_OPTIONS screw up formatting
[xfstests-dev.git] / tests / xfs / 233
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016, Oracle and/or its affiliates.  All Rights Reserved.
4 #
5 # FS QA Test No. 233
6 #
7 # Tests xfs_growfs on a rmapbt filesystem
8 #
9 . ./common/preamble
10 _begin_fstest auto quick rmap
11
12 # Import common functions.
13 . ./common/filter
14
15 # real QA test starts here
16 _supported_fs xfs
17 _require_xfs_scratch_rmapbt
18 _require_no_large_scratch_dev
19
20 echo "Format and mount"
21 _scratch_mkfs_sized $((2 * 4096 * 4096)) > $seqres.full 2>&1
22 _scratch_mount >> $seqres.full 2>&1
23
24 testdir=$SCRATCH_MNT/test-$seq
25 mkdir $testdir
26
27 echo "Create the original files"
28 blksz="$(_get_block_size $testdir)"
29 _pwrite_byte 0x61 0 $((blksz * 14 + 71)) $testdir/original >> $seqres.full
30 cp -p $testdir/original $testdir/copy1
31 cp -p $testdir/copy1 $testdir/copy2
32
33 echo "Grow fs"
34 $XFS_GROWFS_PROG $SCRATCH_MNT 2>&1 |  _filter_growfs >> $seqres.full
35 _scratch_cycle_mount
36
37 echo "Create more copies"
38 cp -p $testdir/original $testdir/copy3
39
40 $XFS_INFO_PROG $SCRATCH_MNT >> $seqres.full
41
42 # success, all done
43 status=0
44 exit