btrfs-progs/tests/mkfs-tests/011-rootdir-create-file/test.sh
David Sterba 83c0a82289 btrfs-progs: tests: switch mktemp to local helpers
Use the helpers to create temporary files, this save some typing and
we'll have a bit more consistent naming.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-10-20 18:59:24 +02:00

16 lines
489 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"
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"