From d1e48bd3db77901f126ec3c2143fa64b4e5948a0 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 18 Aug 2021 14:02:36 +0200 Subject: [PATCH] qemuxml2argvtest: Unify 'cpu-tsc-frequency' and 'cpu-tsc-high-frequency' case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the larger number in the original test to avoid having two files. Additionally this avoids use of 'host-model' with DO_TEST_CAPS_LATEST in cases when it isn't necessary for the purpose of the test as the CPU model tends to change. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tests/qemuxml2argvdata/cpu-tsc-frequency.args | 2 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 2 +- tests/qemuxml2argvdata/cpu-tsc-frequency.xml | 2 +- .../cpu-tsc-high-frequency.x86_64-latest.args | 33 ----------------- .../cpu-tsc-high-frequency.xml | 35 ------------------- tests/qemuxml2argvtest.c | 1 - 6 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/cpu-tsc-high-frequency.xml diff --git a/tests/qemuxml2argvdata/cpu-tsc-frequency.args b/tests/qemuxml2argvdata/cpu-tsc-frequency.args index 1f582f720c..2a031b6ef0 100644 --- a/tests/qemuxml2argvdata/cpu-tsc-frequency.args +++ b/tests/qemuxml2argvdata/cpu-tsc-frequency.args @@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -machine pc,accel=kvm,usb=off,dump-guest-core=off \ --cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+invtsc,tsc-frequency=3504000000 \ +-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+invtsc,tsc-frequency=4567890000 \ -m 214 \ -realtime mlock=off \ -smp 1,sockets=1,cores=1,threads=1 \ diff --git a/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args index cc78591c97..91b6e7943b 100644 --- a/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args +++ b/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args @@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -machine pc-i440fx-4.0,accel=kvm,usb=off,dump-guest-core=off \ --cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on,invtsc=on,tsc-frequency=3504000000 \ +-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on,invtsc=on,tsc-frequency=4567890000 \ -m 214 \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ diff --git a/tests/qemuxml2argvdata/cpu-tsc-frequency.xml b/tests/qemuxml2argvdata/cpu-tsc-frequency.xml index adb118c527..afaef6e8e5 100644 --- a/tests/qemuxml2argvdata/cpu-tsc-frequency.xml +++ b/tests/qemuxml2argvdata/cpu-tsc-frequency.xml @@ -18,7 +18,7 @@ - + destroy restart diff --git a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args deleted file mode 100644 index c39817af98..0000000000 --- a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args +++ /dev/null @@ -1,33 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-x86_64 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ --cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,svm=off,npt=off,nrip-save=off,invtsc=on,tsc-frequency=4567890000 \ --m 214 \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ --audiodev id=audio1,driver=none \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.xml b/tests/qemuxml2argvdata/cpu-tsc-high-frequency.xml deleted file mode 100644 index afaef6e8e5..0000000000 --- a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.xml +++ /dev/null @@ -1,35 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - A description of the test machine. - - A test of qemu's minimal configuration. - This test also tests the description and title elements. - - 219100 - 219100 - 1 - - hvm - - - - - - - - - - destroy - restart - destroy - - /usr/bin/qemu-system-x86_64 - - - - - - - - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 00a85988d6..72a3bb5b75 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2096,7 +2096,6 @@ mymain(void) DO_TEST_CAPS_VER("cpu-host-model-cmt", "4.0.0"); DO_TEST("cpu-tsc-frequency", QEMU_CAPS_KVM); DO_TEST_CAPS_VER("cpu-tsc-frequency", "4.0.0"); - DO_TEST_CAPS_LATEST("cpu-tsc-high-frequency"); DO_TEST_CAPS_VER("cpu-translation", "4.0.0"); DO_TEST_CAPS_LATEST("cpu-translation"); qemuTestSetHostCPU(&driver, driver.hostarch, NULL);