]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(test): only use QEMU machine q35 on x86
authorBenjamin Drung <benjamin.drung@canonical.com>
Thu, 17 Aug 2023 17:35:04 +0000 (19:35 +0200)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Tue, 22 Aug 2023 11:50:42 +0000 (07:50 -0400)
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 <benjamin.drung@canonical.com>
test/run-qemu

index 0ce27b51790098d7a1fe335cf3c992aea00356ff..a3f30a079258cf42aaa3a3a8398086bca96e005d 100755 (executable)
@@ -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)