2017-11-29 08:26:02 +00:00
|
|
|
#!/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")
|
|
|
|
|
2018-03-12 18:17:49 +00:00
|
|
|
source "$TEST_TOP/common"
|
2017-11-29 08:26:02 +00:00
|
|
|
|
|
|
|
check_prereq mkfs.btrfs
|
|
|
|
|
|
|
|
tmp=$(mktemp -d --tmpdir btrfs-progs-mkfs.rootdirXXXXXXX)
|
|
|
|
# we can't use TEST_DEV, a file is needed
|
|
|
|
img=$(mktemp btrfs-progs-mkfs.rootdirXXXXXXX)
|
2019-12-17 06:36:51 +00:00
|
|
|
run_check "$TOP/mkfs.btrfs" -f --rootdir "$INTERNAL_BIN/Documentation/" "$img"
|
2017-11-29 08:26:02 +00:00
|
|
|
|
|
|
|
rm -rf -- "$img"
|