"Fossies" - the Fresh Open Source Software Archive

Member "btrfs-progs-v5.4.1/tests/mkfs-tests/011-rootdir-create-file/test.sh" (9 Jan 2020, 533 Bytes) of package /linux/misc/btrfs-progs-v5.4.1.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. See also the latest Fossies "Diffs" side-by-side code changes report for "test.sh": v5.4_vs_v5.4.1.

    1 #!/bin/bash
    2 # Regression test for mkfs.btrfs --rootdir on non-existent file.
    3 # Expected behavior: it should create a new file if destination doesn't exist
    4 # Regression 460e93f25754 ("btrfs-progs: mkfs: check the status of file at mkfs")
    6 source "$TEST_TOP/common"
    8 check_prereq mkfs.btrfs
   10 tmp=$(mktemp -d --tmpdir btrfs-progs-mkfs.rootdirXXXXXXX)
   11 # we can't use TEST_DEV, a file is needed
   12 img=$(mktemp btrfs-progs-mkfs.rootdirXXXXXXX)
   13 run_check "$TOP/mkfs.btrfs" -f --rootdir "$INTERNAL_BIN/Documentation/" "$img"
   15 rm -rf -- "$img"