mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
uml: virt-make-fs: Modify test so it doesn't use qcow2 under UML.
Modify the test so it doesn't try to test qcow2 format when the backend is User-Mode Linux which doesn't support qcow2.
This commit is contained in:
@@ -37,6 +37,11 @@ if [ -n "$SKIP_TEST_VIRT_MAKE_FS_BTRFS" ]; then
|
||||
btrfs_available=
|
||||
fi
|
||||
|
||||
# UML backend doesn't support qcow2.
|
||||
if [ "$(../fish/guestfish get-backend)" != "uml" ]; then
|
||||
qcow2_supported=yes
|
||||
fi
|
||||
|
||||
declare -a choices
|
||||
|
||||
# Return a random element from the array 'choices'.
|
||||
@@ -58,8 +63,12 @@ if [ "$btrfs_available" = "yes" ]; then
|
||||
fi
|
||||
type=`random_choice`
|
||||
|
||||
choices=(--format=raw --format=qcow2)
|
||||
format=`random_choice`
|
||||
if [ "$qcow2_supported" = "yes" ]; then
|
||||
choices=(--format=raw --format=qcow2)
|
||||
format=`random_choice`
|
||||
else
|
||||
format="--format=raw"
|
||||
fi
|
||||
|
||||
choices=(--partition --partition=gpt)
|
||||
partition=`random_choice`
|
||||
|
||||
Reference in New Issue
Block a user