[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 4/4] tests: Add more tests for virConnectBaselineCPU



https://bugzilla.redhat.com/show_bug.cgi?id=1049391

The new tests would fail in various ways without the two previous
commits.

Signed-off-by: Jiri Denemark <jdenemar redhat com>
---
 tests/cputest.c                               |  5 +++
 tests/cputestdata/x86-baseline-3-result.xml   |  3 ++
 tests/cputestdata/x86-baseline-4-expanded.xml | 46 ++++++++++++++++++++++++++
 tests/cputestdata/x86-baseline-4-result.xml   | 14 ++++++++
 tests/cputestdata/x86-baseline-4.xml          | 18 ++++++++++
 tests/cputestdata/x86-baseline-5-expanded.xml | 47 +++++++++++++++++++++++++++
 tests/cputestdata/x86-baseline-5-result.xml   | 10 ++++++
 tests/cputestdata/x86-baseline-5.xml          | 35 ++++++++++++++++++++
 8 files changed, 178 insertions(+)
 create mode 100644 tests/cputestdata/x86-baseline-3-result.xml
 create mode 100644 tests/cputestdata/x86-baseline-4-expanded.xml
 create mode 100644 tests/cputestdata/x86-baseline-4-result.xml
 create mode 100644 tests/cputestdata/x86-baseline-4.xml
 create mode 100644 tests/cputestdata/x86-baseline-5-expanded.xml
 create mode 100644 tests/cputestdata/x86-baseline-5-result.xml
 create mode 100644 tests/cputestdata/x86-baseline-5.xml

diff --git a/tests/cputest.c b/tests/cputest.c
index 247fd10..c03538a 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -619,7 +619,12 @@ mymain(void)
     DO_TEST_BASELINE("x86", "some-vendors", 0, 0);
     DO_TEST_BASELINE("x86", "1", 0, 0);
     DO_TEST_BASELINE("x86", "2", 0, 0);
+    DO_TEST_BASELINE("x86", "3", 0, 0);
     DO_TEST_BASELINE("x86", "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
+    DO_TEST_BASELINE("x86", "4", 0, 0);
+    DO_TEST_BASELINE("x86", "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
+    DO_TEST_BASELINE("x86", "5", 0, 0);
+    DO_TEST_BASELINE("x86", "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
 
     DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1);
     DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0);
diff --git a/tests/cputestdata/x86-baseline-3-result.xml b/tests/cputestdata/x86-baseline-3-result.xml
new file mode 100644
index 0000000..7349831
--- /dev/null
+++ b/tests/cputestdata/x86-baseline-3-result.xml
@@ -0,0 +1,3 @@
+<cpu mode='custom' match='exact'>
+  <model fallback='forbid'>Westmere</model>
+</cpu>
diff --git a/tests/cputestdata/x86-baseline-4-expanded.xml b/tests/cputestdata/x86-baseline-4-expanded.xml
new file mode 100644
index 0000000..b5671b5
--- /dev/null
+++ b/tests/cputestdata/x86-baseline-4-expanded.xml
@@ -0,0 +1,46 @@
+<cpu mode='custom' match='exact'>
+  <model fallback='forbid'>Westmere</model>
+  <vendor>Intel</vendor>
+  <feature policy='require' name='hypervisor'/>
+  <feature policy='require' name='avx'/>
+  <feature policy='require' name='osxsave'/>
+  <feature policy='require' name='xsave'/>
+  <feature policy='require' name='tsc-deadline'/>
+  <feature policy='require' name='x2apic'/>
+  <feature policy='require' name='pcid'/>
+  <feature policy='require' name='pclmuldq'/>
+  <feature policy='require' name='ss'/>
+  <feature policy='require' name='vme'/>
+  <feature policy='require' name='lahf_lm'/>
+  <feature policy='require' name='lm'/>
+  <feature policy='require' name='nx'/>
+  <feature policy='require' name='syscall'/>
+  <feature policy='require' name='aes'/>
+  <feature policy='require' name='popcnt'/>
+  <feature policy='require' name='sse4.2'/>
+  <feature policy='require' name='sse4.1'/>
+  <feature policy='require' name='cx16'/>
+  <feature policy='require' name='ssse3'/>
+  <feature policy='require' name='pni'/>
+  <feature policy='require' name='sse2'/>
+  <feature policy='require' name='sse'/>
+  <feature policy='require' name='fxsr'/>
+  <feature policy='require' name='mmx'/>
+  <feature policy='require' name='clflush'/>
+  <feature policy='require' name='pse36'/>
+  <feature policy='require' name='pat'/>
+  <feature policy='require' name='cmov'/>
+  <feature policy='require' name='mca'/>
+  <feature policy='require' name='pge'/>
+  <feature policy='require' name='mtrr'/>
+  <feature policy='require' name='sep'/>
+  <feature policy='require' name='apic'/>
+  <feature policy='require' name='cx8'/>
+  <feature policy='require' name='mce'/>
+  <feature policy='require' name='pae'/>
+  <feature policy='require' name='msr'/>
+  <feature policy='require' name='tsc'/>
+  <feature policy='require' name='pse'/>
+  <feature policy='require' name='de'/>
+  <feature policy='require' name='fpu'/>
+</cpu>
diff --git a/tests/cputestdata/x86-baseline-4-result.xml b/tests/cputestdata/x86-baseline-4-result.xml
new file mode 100644
index 0000000..44fbc38
--- /dev/null
+++ b/tests/cputestdata/x86-baseline-4-result.xml
@@ -0,0 +1,14 @@
+<cpu mode='custom' match='exact'>
+  <model fallback='forbid'>Westmere</model>
+  <vendor>Intel</vendor>
+  <feature policy='require' name='hypervisor'/>
+  <feature policy='require' name='avx'/>
+  <feature policy='require' name='osxsave'/>
+  <feature policy='require' name='xsave'/>
+  <feature policy='require' name='tsc-deadline'/>
+  <feature policy='require' name='x2apic'/>
+  <feature policy='require' name='pcid'/>
+  <feature policy='require' name='pclmuldq'/>
+  <feature policy='require' name='ss'/>
+  <feature policy='require' name='vme'/>
+</cpu>
diff --git a/tests/cputestdata/x86-baseline-4.xml b/tests/cputestdata/x86-baseline-4.xml
new file mode 100644
index 0000000..7f5ae16
--- /dev/null
+++ b/tests/cputestdata/x86-baseline-4.xml
@@ -0,0 +1,18 @@
+<cpuTest>
+<cpu>
+  <arch>x86_64</arch>
+  <model>Westmere</model>
+  <vendor>Intel</vendor>
+  <topology sockets='4' cores='1' threads='1'/>
+  <feature name='hypervisor'/>
+  <feature name='avx'/>
+  <feature name='osxsave'/>
+  <feature name='xsave'/>
+  <feature name='tsc-deadline'/>
+  <feature name='x2apic'/>
+  <feature name='pcid'/>
+  <feature name='pclmuldq'/>
+  <feature name='ss'/>
+  <feature name='vme'/>
+</cpu>
+</cpuTest>
diff --git a/tests/cputestdata/x86-baseline-5-expanded.xml b/tests/cputestdata/x86-baseline-5-expanded.xml
new file mode 100644
index 0000000..2408704
--- /dev/null
+++ b/tests/cputestdata/x86-baseline-5-expanded.xml
@@ -0,0 +1,47 @@
+<cpu mode='custom' match='exact'>
+  <model fallback='allow'>SandyBridge</model>
+  <vendor>Intel</vendor>
+  <feature policy='require' name='hypervisor'/>
+  <feature policy='require' name='osxsave'/>
+  <feature policy='require' name='pcid'/>
+  <feature policy='require' name='ss'/>
+  <feature policy='require' name='vme'/>
+  <feature policy='disable' name='rdtscp'/>
+  <feature policy='require' name='lahf_lm'/>
+  <feature policy='require' name='lm'/>
+  <feature policy='require' name='nx'/>
+  <feature policy='require' name='syscall'/>
+  <feature policy='require' name='avx'/>
+  <feature policy='require' name='xsave'/>
+  <feature policy='require' name='aes'/>
+  <feature policy='require' name='tsc-deadline'/>
+  <feature policy='require' name='popcnt'/>
+  <feature policy='require' name='x2apic'/>
+  <feature policy='require' name='sse4.2'/>
+  <feature policy='require' name='sse4.1'/>
+  <feature policy='require' name='cx16'/>
+  <feature policy='require' name='ssse3'/>
+  <feature policy='require' name='pclmuldq'/>
+  <feature policy='require' name='pni'/>
+  <feature policy='require' name='sse2'/>
+  <feature policy='require' name='sse'/>
+  <feature policy='require' name='fxsr'/>
+  <feature policy='require' name='mmx'/>
+  <feature policy='require' name='clflush'/>
+  <feature policy='require' name='pse36'/>
+  <feature policy='require' name='pat'/>
+  <feature policy='require' name='cmov'/>
+  <feature policy='require' name='mca'/>
+  <feature policy='require' name='pge'/>
+  <feature policy='require' name='mtrr'/>
+  <feature policy='require' name='sep'/>
+  <feature policy='require' name='apic'/>
+  <feature policy='require' name='cx8'/>
+  <feature policy='require' name='mce'/>
+  <feature policy='require' name='pae'/>
+  <feature policy='require' name='msr'/>
+  <feature policy='require' name='tsc'/>
+  <feature policy='require' name='pse'/>
+  <feature policy='require' name='de'/>
+  <feature policy='require' name='fpu'/>
+</cpu>
diff --git a/tests/cputestdata/x86-baseline-5-result.xml b/tests/cputestdata/x86-baseline-5-result.xml
new file mode 100644
index 0000000..3c2f38c
--- /dev/null
+++ b/tests/cputestdata/x86-baseline-5-result.xml
@@ -0,0 +1,10 @@
+<cpu mode='custom' match='exact'>
+  <model fallback='allow'>SandyBridge</model>
+  <vendor>Intel</vendor>
+  <feature policy='require' name='hypervisor'/>
+  <feature policy='require' name='osxsave'/>
+  <feature policy='require' name='pcid'/>
+  <feature policy='require' name='ss'/>
+  <feature policy='require' name='vme'/>
+  <feature policy='disable' name='rdtscp'/>
+</cpu>
diff --git a/tests/cputestdata/x86-baseline-5.xml b/tests/cputestdata/x86-baseline-5.xml
new file mode 100644
index 0000000..80cd533
--- /dev/null
+++ b/tests/cputestdata/x86-baseline-5.xml
@@ -0,0 +1,35 @@
+<cpuTest>
+<cpu>
+  <arch>x86_64</arch>
+  <model>Westmere</model>
+  <vendor>Intel</vendor>
+  <topology sockets='4' cores='1' threads='1'/>
+  <feature name='hypervisor'/>
+  <feature name='avx'/>
+  <feature name='osxsave'/>
+  <feature name='xsave'/>
+  <feature name='tsc-deadline'/>
+  <feature name='x2apic'/>
+  <feature name='pcid'/>
+  <feature name='pclmuldq'/>
+  <feature name='ss'/>
+  <feature name='vme'/>
+</cpu>
+<cpu>
+  <arch>x86_64</arch>
+  <model>Nehalem</model>
+  <vendor>Intel</vendor>
+  <topology sockets='4' cores='1' threads='1'/>
+  <feature name='aes'/>
+  <feature name='hypervisor'/>
+  <feature name='avx'/>
+  <feature name='osxsave'/>
+  <feature name='xsave'/>
+  <feature name='tsc-deadline'/>
+  <feature name='x2apic'/>
+  <feature name='pcid'/>
+  <feature name='pclmuldq'/>
+  <feature name='ss'/>
+  <feature name='vme'/>
+</cpu>
+</cpuTest>
-- 
1.8.5.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]