mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-14 10:25:27 +00:00
f6bbe06c08
Executing the script inside the directories as './test.sh' is not supposed to work but could happen accidentally. With an exit after attempting to source the we can fix that. Signed-off-by: David Sterba <dsterba@suse.com>
16 lines
497 B
Bash
Executable File
16 lines
497 B
Bash
Executable File
#!/bin/bash
|
|
# Regression test for mkfs.btrfs --rootdir on non-existent file.
|
|
# Expected behavior: it should create a new file if destination doesn't exist
|
|
# Regression 460e93f25754 ("btrfs-progs: mkfs: check the status of file at mkfs")
|
|
|
|
source "$TEST_TOP/common" || exit
|
|
|
|
check_prereq mkfs.btrfs
|
|
|
|
tmp=$(_mktemp_dir mkfs-rootdir)
|
|
# we can't use TEST_DEV, a file is needed
|
|
img=$(_mktemp mkfs-rootdir)
|
|
run_check "$TOP/mkfs.btrfs" -f --rootdir "$INTERNAL_BIN/Documentation/" "$img"
|
|
|
|
rm -rf -- "$img"
|