From: Benjamin Drung Date: Thu, 17 Aug 2023 17:35:04 +0000 (+0200) Subject: fix(test): only use QEMU machine q35 on x86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f29e428bdb3068e25150bc9591a961bd2df66442;p=thirdparty%2Fdracut.git 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 --- 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)