"Fossies" - the Fresh Open Source Software Archive

Member "btrfs-progs-v5.4/tests/convert-tests/016-invalid-large-inline-extent/test.sh" (3 Dec 2019, 619 Bytes) of package /linux/misc/btrfs-progs-v5.4.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 # Check if btrfs-convert refuses to rollback the filesystem, and leave the fs
    3 # and the convert image untouched
    4 
    5 source "$TEST_TOP/common"
    6 source "$TEST_TOP/common.convert"
    7 
    8 setup_root_helper
    9 prepare_test_dev
   10 check_prereq btrfs-convert
   11 check_global_prereq mke2fs
   12 
   13 convert_test_prep_fs ext4 mke2fs -t ext4 -b 4096
   14 
   15 # Create a 6K file, which should not be inlined
   16 run_check $SUDO_HELPER dd if=/dev/zero bs=2k count=3 of="$TEST_MNT/file1"
   17 
   18 run_check_umount_test_dev
   19 
   20 # convert_test_do_convert() will call btrfs check, which should expose any
   21 # invalid inline extent with too large size
   22 convert_test_do_convert