[libvirt] [PATCH 1/3] qemu: Always assume QEMU_CAPS_REALTIME_MLOCK

Michal Privoznik mprivozn at redhat.com
Fri Apr 12 11:22:33 UTC 2019


On 4/12/19 12:03 PM, Ján Tomko wrote:
> On Fri, Apr 12, 2019 at 10:46:39AM +0200, Michal Privoznik wrote:
>> The '-realtime mlock' cmd line argument was introduced in QEMU
>> commit v1.5.0-rc0~190 which matches minimal QEMU version we
>> require. Therefore, the capability will always be present.
>>
>> Apparently, nearly none of our xml2argv test cases had the
>> capability hence slightly bigger change under qemuxml2argvdata/.
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>> src/qemu/qemu_capabilities.c                        |  1 -
>> src/qemu/qemu_capabilities.h                        |  2 +-
>> src/qemu/qemu_command.c                             | 13 +++----------
>> tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml  |  1 -
>> tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml  |  1 -
>> tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml     |  1 -
>> tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml    |  1 -
>> tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml   |  1 -
>> tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml    |  1 -
>> .../qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args |  1 +
>> tests/qemuxml2argvdata/aarch64-acpi-uefi.args       |  1 +
>> tests/qemuxml2argvdata/aarch64-cpu-passthrough.args |  1 +
>> tests/qemuxml2argvdata/aarch64-gic-host.args        |  1 +
> 
> [..]
> 
>> tests/qemuxml2argvdata/watchdog.args                |  1 +
>> tests/qemuxml2argvdata/x86-kvm-32-on-64.args        |  1 +
>> tests/qemuxml2argvtest.c                            |  5 ++---
>> 609 files changed, 575 insertions(+), 51 deletions(-)
>>
>> diff --git a/tests/qemuxml2argvdata/mlock-unsupported.args 
>> b/tests/qemuxml2argvdata/mlock-unsupported.args
>> index c347035698..aa41fb6eb8 100644
>> --- a/tests/qemuxml2argvdata/mlock-unsupported.args
>> +++ b/tests/qemuxml2argvdata/mlock-unsupported.args
>> @@ -12,6 +12,7 @@ QEMU_AUDIO_DRV=none \
>> -S \
>> -machine pc,accel=tcg,usb=off,dump-guest-core=off \
>> -m 214 \
>> +-realtime mlock=off \
> 
> This does not really belong to a 'mlock-unsupported' test.
> 
>> -smp 1,sockets=1,cores=1,threads=1 \
>> -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
>> -display none \
>> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
>> index 498892c4fd..8b517d83aa 100644
>> --- a/tests/qemuxml2argvtest.c
>> +++ b/tests/qemuxml2argvtest.c
>> @@ -2399,9 +2399,8 @@ mymain(void)
>>             QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
>>             QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY);
>>
>> -    DO_TEST("mlock-on", QEMU_CAPS_REALTIME_MLOCK);
>> -    DO_TEST_FAILURE("mlock-on", NONE);
>> -    DO_TEST("mlock-off", QEMU_CAPS_REALTIME_MLOCK);
>> +    DO_TEST("mlock-on", NONE);
>> +    DO_TEST("mlock-off", NONE);
>>     DO_TEST("mlock-unsupported", NONE);
> 
> Rather than keeping these, it would be nicer to use the DO_TEST_CAPS
> tests. Provided for your convenience here:
> https://www.redhat.com/archives/libvir-list/2019-April/msg00839.html
> since I already started working on this in parallel (without grabbing a
> lock - ironic, isn't it?)
> 

OKay, I've ACKed your patches and lets push them before mine. I'll 
update the tests accordingly.

> To the rest:
> Reviewed-by: Ján Tomko <jtomko at redhat.com>

Thanks,
Michal




More information about the libvir-list mailing list