On 8/27/2025 3:55 PM, Peter Krempa wrote:
On Wed, Aug 27, 2025 at 14:41:38 -0500, Praveen K Paladugu wrote:
On 8/26/2025 11:14 AM, Peter Krempa wrote:
On Tue, Aug 26, 2025 at 09:33:59 -0500, Praveen K Paladugu wrote:
On 8/25/2025 3:22 PM, Peter Krempa wrote:
On Mon, Aug 25, 2025 at 10:57:52 -0500, Praveen K Paladugu wrote:
Introduce mshv variant in capabilities tests.
Signed-off-by: Praveen K Paladugu <pra...@linux.microsoft.com>
---
.../caps_11.3.0_x86_64+mshv.replies | 46912 ++++++++++++++++
.../caps_11.3.0_x86_64+mshv.xml | 4996 ++
.../qemucaps2xmloutdata/caps.x86_64+mshv.xml | 29 +
3 files changed, 51937 insertions(+)
create mode 100644
tests/qemucapabilitiesdata/caps_11.3.0_x86_64+mshv.replies
create mode 100644 tests/qemucapabilitiesdata/caps_11.3.0_x86_64+mshv.xml
create mode 100644 tests/qemucaps2xmloutdata/caps.x86_64+mshv.xml
Few issues:
1) the test-suite fails after this patch:
$ VIR_TEST_REGENERATE_OUTPUT=1 ./tests/domaincapstest
TEST: domaincapstest
............................../home/pipo/libvirt/tests/domaincapsdata/qemu_11.3.0.x86_64+mshv.xml:
failed to open: No such file or directory
!/home/pipo/libvirt/tests/domaincapsdata/qemu_11.3.0-q35.x86_64+mshv.xml:
failed to open: No such file or directory
!/home/pipo/libvirt/tests/domaincapsdata/qemu_11.3.0-tcg.x86_64+mshv.xml:
failed to open: No such file or directory
!....... 40
.................................. 74 FAIL
3 tests failed. Run them using:
VIR_TEST_DEBUG=1 VIR_TEST_RANGE=31-33 ./tests/domaincapstest
You seem to have forgotten to commit the two output files.
I didn't notice this failure among the other failures I am seeing with this
test locally. I will investigate this further.
Can you elaborate what other failures you are seeing?
I should have clarified this. The test failures I am noticing were not
introduced by my code changes. I see these failures even while using latest
upstream code (commit: 5b69c37265e4ec876d7a46bd865427388bc37da2):
This logic is flawed. If the tests don't pass before your changes ...
Summary of Failures:
73/300 libvirt:bin / domaincapstest FAIL 1.23s exit
status 1
... how can you tell that your changes didn't break these?
123/300 libvirt:bin / qemufirmwaretest FAIL 0.04s exit
status 1
131/300 libvirt:bin / qemuvhostusertest FAIL 0.03s exit
status 1
182/300 libvirt:bin / qemuxmlconftest FAIL 7.45s exit
status 1
These could be related to missing components or incorrect configuration
on my development host (Fedora 42). I didn't investigate these failures,
A sizable part of libvirt developers do use Fedora, so the tests do pass
almost all the time.
yet.
So, and how do you configure your build?
I investigated this issue today. Seems like my build
configuration was incorrect. I was passing incorrect "prefix"
(--prefix=/) to meson setup.
This could have resulted in the tests using incorrect mocks.
I dropped "--prefix" argument to meson setup like below and now
I have all the tests passing locally while using latest upstream commit:
meson setup build \
-Dapparmor=disabled \
-Ddocs=disabled \
-Ddriver_openvz=disabled \
-Ddriver_lxc=disabled \
-Ddriver_vbox=disabled \
-Ddriver_esx=disabled \
-Dstorage_iscsi_direct=disabled \
-Dfirewalld=disabled \
-Dpolkit=disabled \
-Ddriver_ch=enabled \
-Ddriver_qemu=enabled
domaincapstest:
VIR_TEST_DEBUG=1
VIR_TEST_RANGE=2,4-7,9-10,12,14,16,19-21,23-24,26-27,29-31,34,36-37,39-40,42-43,47,49,51,53-54,56-57,59-60,62-63,65,67-68
/home/prapal/Source/libvirt/build/tests/domaincapstest
Most of these tests fail with following signature:
2) qemu_7.2.0.x86_64 ...
In
'/home/username/Source/libvirt/tests/domaincapsdata/qemu_7.2.0.x86_64.xml':
Offset 275
Expect [ <value>efi</value>
<]
Actual [<]
qemufirmwaretest:
$ VIR_TEST_DEBUG=1 VIR_TEST_RANGE=19-20,22,24-26
/home/prapal/Source/libvirt/build/tests/qemufirmwaretest
TEST: qemufirmwaretest
19) QEMU FW precedence test ... Unexpected path. Expected
//share/qemu/firmware/30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json got
/etc/qemu/firmware/59-combined.json
FAILED
20) QEMU FW SUPPORTED pc-i440fx-3.1 VIR_ARCH_X86_64 ... Mismatch in
supported interfaces. Expected 0x6 got 0x2
FAILED
22) QEMU FW SUPPORTED pc-q35-3.1 VIR_ARCH_X86_64 ... Unexpected FW image:
/usr/share/edk2/ovmf/OVMF.secboot.fd NVRAM: <null>
Expected: /usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2 NVRAM:
/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2
FAILED
24) QEMU FW SUPPORTED microvm VIR_ARCH_X86_64 ... Mismatch in supported
interfaces. Expected 0x4 got 0x0
FAILED
25) QEMU FW SUPPORTED virt-3.1 VIR_ARCH_AARCH64 ... Mismatch in supported
interfaces. Expected 0x4 got 0x0
FAILED
26) QEMU FW SUPPORTED virt VIR_ARCH_RISCV64 ... Mismatch in supported
interfaces. Expected 0x4 got 0x0
FAILED
6 tests failed. Run them using:
VIR_TEST_DEBUG=1 VIR_TEST_RANGE=19-20,22,24-26
/home/prapal/Source/libvirt/build/tests/qemufirmwaretest
My hunch would be that the mocks, which are meant to make the tests
independent from your host system are not applied.
Is your source directory the git tree? How did you configure the build?
Did you follow any of our guides? e.g.
https://libvirt.org/compiling.html I want do understand if any of our
documentation is broken.
I identified the reason for the tests failing on my dev hosts. No need
to update the documentation at https://libvirt.org/compiling.html.
Since majority of the tests were passing, I assumed the setup was
correct, which led to some unnecessary churn. Sorry about all the noise
this may have caused.
--
Regards,
Praveen K Paladugu