btrfs-progs: introduce TEST_TOP and INTERNAL_BIN for tests
[platform/upstream/btrfs-progs.git] / tests / convert-tests / 012-reiserfs-large-hole-extent / test.sh
1 #!/bin/bash
2 # Create a base image with large hole extent, then convert to btrfs,
3 # check the converted image.
4 # Check if btrfs-convert can handle such large hole.
5 # Fast pinpoint regression test. No options combination nor checksum
6 # verification
7
8 source "$TEST_TOP/common"
9 source "$TEST_TOP/common.convert"
10
11 if ! check_kernel_support_reiserfs >/dev/null; then
12         _not_run "no reiserfs support"
13 fi
14
15 setup_root_helper
16 prepare_test_dev
17 check_prereq btrfs-convert
18 check_global_prereq mkreiserfs
19
20 default_mkfs="mkreiserfs -b 4096"
21 convert_test_preamble '' 'large hole extent test' 16k "$default_mkfs"
22 convert_test_prep_fs reiserfs $default_mkfs
23
24 run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/file" bs=1M \
25         count=1 seek=1024 > /dev/null 2>&1
26
27 run_check_umount_test_dev
28 convert_test_do_convert