From a5a8392eccff307dded07c801a18b83d0b61041f Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 28 May 2024 14:00:13 +0200 Subject: [PATCH] test: Use 'virt' machine type on aarch64 'q35' is x86_64 specific, and there is no 'virt' on x86_64. Signed-off-by: Christophe Fergeau --- test/suite_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/suite_test.go b/test/suite_test.go index 9f2cf2fcf..c6e7b1c36 100644 --- a/test/suite_test.go +++ b/test/suite_test.go @@ -166,7 +166,16 @@ func qemuArgs() string { if runtime.GOOS == "darwin" { accel = "hvf" } - return fmt.Sprintf("-machine q35,accel=%s:tcg -smp 4 -cpu host", accel) + machine := "q35" + switch runtime.GOARCH { + case "amd64": + machine = "q35" + case "arm64": + machine = "virt" + default: + panic(fmt.Sprintf("unsupported arch: %s", runtime.GOARCH)) + } + return fmt.Sprintf("-machine %s,accel=%s:tcg -smp 4 -cpu host", machine, accel) } func createSSHKeys() (string, error) {