test/vhost: add -f for mkfs.btrfs command

During tests with new qcow2 image there is error:
    ERROR: use the -f option to force overwrite of /dev/sdb1
when creating filesystem using mkfs.btrfs, adding -f
resolve this issue.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If6548d3d5781e2b46f794422144e2a635e700559
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4660
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Maciej Wawryk 2020-10-14 12:20:17 +02:00 committed by Tomasz Zawadzki
parent 3c408dd5a6
commit 5df2c9a343

View File

@ -36,7 +36,7 @@ for fs in $fs; do
$parted_cmd mkpart primary 2048s 100%
mkfs_cmd="mkfs.$fs"
if [[ $fs == "ntfs" ]]; then
if [[ $fs == "ntfs" ]] || [[ $fs == "btrfs" ]]; then
mkfs_cmd+=" -f"
fi
mkfs_cmd+=" /dev/${dev}1"