On Fri, Dec 09, 2016 at 14:38:39 -0500, Jason J. Herne wrote: > From: "Collin L. Walling" <walling@xxxxxxxxxxxxxxxxxx> > > Tests Qemu capabilities on s390x before and after the availability of > the query-cpu-model-expansion QMP command. The host CPU is mocked to use > the zEC12.2-base model for these tests, which has a defined set of features > expected to be available on this model. > > Signed-off-by: Collin L. Walling <walling@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Jason J. Herne <jjherne@xxxxxxxxxxxxxxxxxx> > --- > tests/qemucapabilitiestest.c | 4 ++++ > tests/testutilsqemu.c | 39 ++++++++++++++++++++++++++++++++++++++- > tests/testutilsqemu.h | 1 + > 3 files changed, 43 insertions(+), 1 deletion(-) > > diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c > index 51d0cc4..1214d7c 100644 > --- a/tests/qemucapabilitiestest.c > +++ b/tests/qemucapabilitiestest.c > @@ -172,6 +172,10 @@ mymain(void) > DO_TEST("aarch64", "caps_2.6.0-gicv2"); > DO_TEST("aarch64", "caps_2.6.0-gicv3"); > DO_TEST("ppc64le", "caps_2.6.0"); > + qemuTestSetHostCPU(driver.caps, cpuS390zEC12_2_base); > + DO_TEST("s390x", "caps_2.7.0"); > + DO_TEST("s390x", "caps_2.8.0"); > + qemuTestSetHostCPU(driver.caps, NULL); Hmm, there is no code in libvirt which would set the host CPU in virCaps, the caps->host.cpu pointer will always be NULL. We should test that rather than mocking the host CPU here and testing scenarios which will never happen in real world. > /* > * Run "tests/qemucapsprobe /path/to/qemu/binary >foo.replies" The rest of this patch can just be dropped. Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list