Skip to content

Commit

Permalink
test: Use 'virt' machine type on aarch64
Browse files Browse the repository at this point in the history
'q35' is x86_64 specific, and there is no 'virt' on x86_64.

Signed-off-by: Christophe Fergeau <[email protected]>
  • Loading branch information
cfergeau committed Jun 27, 2024
1 parent 974b276 commit a5a8392
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a5a8392

Please sign in to comment.