File: test.sh

package info (click to toggle)
btrfs-progs 6.14-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,252 kB
  • sloc: ansic: 125,283; sh: 7,567; python: 1,386; makefile: 899; asm: 296
file content (15 lines) | stat: -rwxr-xr-x 497 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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"