773bcb03edd9af7a4b75e3f0c0bf0d911e4c8e40
[xfstests-dev.git] / tests / ext4 / 003
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Fujitsu.  All Rights Reserved.
4 #
5 # FS QA Test No. ext4/003
6 #
7 # Regression test for commit:
8 # b5b6077 ext4: fix wrong assert in ext4_mb_normalize_request()
9 # This testcase checks whether this bug has been fixed.
10 #
11 . ./common/preamble
12 _begin_fstest auto quick
13
14 # Override the default cleanup function.
15 _cleanup()
16 {
17     _scratch_unmount
18 }
19
20 # Import common functions.
21 . ./common/filter
22
23 # real QA test starts here
24 _supported_fs ext4
25
26 _require_scratch
27 _require_scratch_ext4_feature "bigalloc"
28
29 BLOCK_SIZE=$(get_page_size)
30 $MKFS_EXT4_PROG -F -b $BLOCK_SIZE -O bigalloc -C $(($BLOCK_SIZE * 16)) -g 256 $SCRATCH_DEV 512m \
31         >> $seqres.full 2>&1
32 _scratch_mount
33
34 $XFS_IO_PROG -f -c "pwrite 0 256m -b 1M" $SCRATCH_MNT/testfile 2>&1 | \
35         _filter_xfs_io
36
37 status=0
38 exit