Use QEMU's standard VGA instead of virtio-vga
On Arch, -vga virtio needs qemu-hw-display-virtio-vga and also qemu-hw-display-virtio-gpu, which that package doesn't depend on; with only the first, QEMU segfaults at start without a message. The smoketest's VMs are headless (or VNC), so -vga std, which qemu-base has, is enough. This reverts 2207208's extra package and checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-13
@@ -18,8 +18,7 @@ setup() {
|
||||
git -C "$WC" rev-parse HEAD > "$STATE/images/installed.ref"
|
||||
|
||||
# A VM is a sleep that lets go of bats' output pipes
|
||||
stub qemu-system-x86_64 '[ "$*" = "-device help" ] && { echo "name \"virtio-vga\", bus PCI"; exit; }
|
||||
while [ $# -gt 0 ]; do [ "$1" = -pidfile ] && pidfile="$2"; shift; done
|
||||
stub qemu-system-x86_64 'while [ $# -gt 0 ]; do [ "$1" = -pidfile ] && pidfile="$2"; shift; done
|
||||
/usr/bin/sleep 300 > /dev/null 2>&1 3>&- &
|
||||
echo $! > "$pidfile"'
|
||||
stub qemu-img 'touch "${@: -1}"'
|
||||
@@ -99,16 +98,7 @@ last_run() {
|
||||
run cdd smoketest run 10 nosuch
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"No scenario called nosuch"* ]]
|
||||
# Only the check for the virtio-vga display, no VM
|
||||
[ -z "$(grep '^qemu-system-x86_64 ' "$STUB_LOG" | grep -v -- '-device help')" ]
|
||||
}
|
||||
|
||||
@test "run stops before any VM when QEMU has no virtio-vga display" {
|
||||
stub qemu-system-x86_64 'echo "name \"VGA\", bus PCI"'
|
||||
run cdd smoketest run 10
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"QEMU has no virtio-vga display"* ]]
|
||||
[ "$(grep -c '^qemu-system-x86_64 ' "$STUB_LOG")" -eq 1 ]
|
||||
not_called qemu-system-x86_64
|
||||
}
|
||||
|
||||
@test "each variant runs in its own VM" {
|
||||
@@ -116,7 +106,7 @@ last_run() {
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"PASS 30-variants @ one"* ]]
|
||||
[[ "$output" == *"PASS 30-variants @ two"* ]]
|
||||
[ "$(grep '^qemu-system-x86_64 ' "$STUB_LOG" | grep -vc -- '-device help')" -eq 2 ]
|
||||
[ "$(grep -c '^qemu-system-x86_64 ' "$STUB_LOG")" -eq 2 ]
|
||||
grep -q "variant two" "$(last_run)/30-variants@two/scenario.log"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user