Re: [PATCH] qemuxmlactivetest: Don't segfault when capability XMLs are invalid

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

 



On a Thursday in 2025, Peter Krempa via Devel wrote:
From: Peter Krempa <pkrempa@xxxxxxxxxx>

This is purely a devel-time problem in the test suite.

'qemuxmlactivetest' invokes the whole test worker twice, once for
inactive output and second time for active.

Now 'testQemuInfoInitArgs' returns a failure if the XML is invalid and
the test is skipped. On another invocation though it returns 0 if
'testQemuInfoSetArgs' was not invoked meanwhile and thus makes it seem
it succeeded which leads to a crash in the code assuming that some
pointers are valid.

Use same interlocking as 'qemuxmlconftest' to skip the second invocation
on failure of the first one.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
tests/qemuxmlactivetest.c | 67 +++++++++++++++++++++++++--------------
1 file changed, 43 insertions(+), 24 deletions(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux