From 3740e9bc6bfbbfc701ee1f9297cd3881615eef3a Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Fri, 17 Apr 2020 09:03:28 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8E=20Allow=20qemu=20to=20use=20all=20?= =?UTF-8?q?available=20CPUs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Speed up the boot tests by allowing qemu to use all of the available CPUs on the system. Our CI VMs have at least 2 CPUs and this shortens the time required for a boot test. Signed-off-by: Major Hayden --- cmd/osbuild-image-tests/context-managers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/osbuild-image-tests/context-managers.go b/cmd/osbuild-image-tests/context-managers.go index bfdd82def..37c78302e 100644 --- a/cmd/osbuild-image-tests/context-managers.go +++ b/cmd/osbuild-image-tests/context-managers.go @@ -10,6 +10,8 @@ import ( "log" "os" "os/exec" + "runtime" + "strconv" "time" ) @@ -128,6 +130,8 @@ func withBootedQemuImage(image string, ns netNS, f func() error) error { qemuX8664Cmd := ns.NamespacedCommand( "qemu-system-x86_64", + "-cpu", "host", + "-smp", strconv.Itoa(runtime.NumCPU()), "-m", "1024", "-snapshot", "-accel", "accel=kvm:hvf:tcg",