From f29e428bdb3068e25150bc9591a961bd2df66442 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Thu, 17 Aug 2023 19:35:04 +0200 Subject: [PATCH] fix(test): only use QEMU machine q35 on x86 The QEMU machine `q35` is only available on x86: ``` qemu-system-aarch64: unsupported machine type Use -machine help to list supported machines ``` Signed-off-by: Benjamin Drung --- test/run-qemu | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/run-qemu b/test/run-qemu index 0ce27b517..a3f30a079 100755 --- a/test/run-qemu +++ b/test/run-qemu @@ -20,8 +20,14 @@ QEMU_CPU="${QEMU_CPU:-max}" exit 1 } +case "$ARCH" in + amd64 | i?86 | x86_64) + ARGS+=(-M q35) + ;; +esac + # Provide rng device sourcing the hosts /dev/urandom and other standard parameters -ARGS+=(-M q35 -smp 2 -m 1024 -nodefaults -vga none -display none -no-reboot -device virtio-rng-pci) +ARGS+=(-smp 2 -m 1024 -nodefaults -vga none -display none -no-reboot -device virtio-rng-pci) if ! [[ $* == *-daemonize* ]] && ! [[ $* == *-daemonize* ]]; then ARGS+=(-serial stdio) -- 2.47.2