[kvm-unit-tests PATCH 2/2] riscv: Introduce MACHINE_OVERRIDE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrew Jones <ajones@xxxxxxxxxxxxxxxx>

Allow riscv tests to use QEMU machine types other than virt.

Signed-off-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx>
---
 riscv/run | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/riscv/run b/riscv/run
index 73f2bf54dc32..e2f5a922728c 100755
--- a/riscv/run
+++ b/riscv/run
@@ -10,10 +10,12 @@ if [ -z "$KUT_STANDALONE" ]; then
 fi
 
 # Allow user overrides of some config.mak variables
+mach=$MACHINE_OVERRIDE
 processor=$PROCESSOR_OVERRIDE
 firmware=$FIRMWARE_OVERRIDE
 
 [ "$PROCESSOR" = "$ARCH" ] && PROCESSOR="max"
+: "${mach:=virt}"
 : "${processor:=$PROCESSOR}"
 : "${firmware:=$FIRMWARE}"
 [ "$firmware" ] && firmware="-bios $firmware"
@@ -23,11 +25,11 @@ set_qemu_accelerator || exit $?
 acc="-accel $ACCEL$ACCEL_PROPS"
 
 qemu=$(search_qemu_binary) || exit $?
-if ! $qemu -machine '?' | grep -q 'RISC-V VirtIO board'; then
+if [ "$mach" = 'virt' ] && ! $qemu -machine '?' | grep -q 'RISC-V VirtIO board'; then
 	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
 	exit 2
 fi
-mach='-machine virt'
+mach="-machine $mach"
 
 command="$qemu -nodefaults -nographic -serial mon:stdio"
 command+=" $mach $acc $firmware -cpu $processor "
-- 
2.48.1





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux