[PATCH 09/15] testQemuHotplugCpuPrepare: Allow deprecated commands for non-modern cpu hotplug test

Peter Krempa posted 15 patches 5 years, 9 months ago
[PATCH 09/15] testQemuHotplugCpuPrepare: Allow deprecated commands for non-modern cpu hotplug test
Posted by Peter Krempa 5 years, 9 months ago
We have a few cases validating that the code behaves correctly in
pre-modern hotplug era. This is controled by the 'modern' flag for the
test. Since 'cpu-add' command is now deprecated in qemu, there is a
modern replacement for it, and the test output is checked against
expected commands we can skip schema validation for the legacy command.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 tests/qemuhotplugtest.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 849e7e7636..724f640aef 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -457,6 +457,9 @@ testQemuHotplugCpuPrepare(const char *test,
     if (fail)
         qemuMonitorTestAllowUnusedCommands(data->mon);

+    if (!data->modern)
+        qemuMonitorTestSkipDeprecatedValidation(data->mon, true);
+
     priv->mon = qemuMonitorTestGetMonitor(data->mon);
     virObjectUnlock(priv->mon);

-- 
2.26.2

Re: [PATCH 09/15] testQemuHotplugCpuPrepare: Allow deprecated commands for non-modern cpu hotplug test
Posted by Ján Tomko 5 years, 8 months ago
On a Wednesday in 2020, Peter Krempa wrote:
>We have a few cases validating that the code behaves correctly in
>pre-modern hotplug era. This is controled by the 'modern' flag for the
>test. Since 'cpu-add' command is now deprecated in qemu, there is a
>modern replacement for it, and the test output is checked against
>expected commands we can skip schema validation for the legacy command.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> tests/qemuhotplugtest.c | 3 +++
> 1 file changed, 3 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano