[PATCH 1/2] qemumonitorjsontest: Work around deprecation of 'vcpu' argument of 'trace-event-get-state'

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

 



'trace-event-get-state' was used for testing schema validation as it had
simple arguments. Now 'vcpu' is optional and deprecated. Fix the test so
that it won't break with upcoming qemu-8.1.

Drop the 'all-attrs' case, as it's not not really testing anything
special and for the 'missing mandatory attr' case use an empty object.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemumonitorjsontest.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 7e79b2e757..8ef4ea7056 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -3021,12 +3021,10 @@ mymain(void)

     DO_TEST_QAPI_VALIDATE("string", "trace-event-get-state/arg-type", true,
                           "{\"name\":\"test\"}");
-    DO_TEST_QAPI_VALIDATE("all attrs", "trace-event-get-state/arg-type", true,
-                          "{\"name\":\"test\", \"vcpu\":123}");
     DO_TEST_QAPI_VALIDATE("attr type mismatch", "trace-event-get-state/arg-type", false,
                           "{\"name\":123}");
     DO_TEST_QAPI_VALIDATE("missing mandatory attr", "trace-event-get-state/arg-type", false,
-                          "{\"vcpu\":123}");
+                          "{}");
     DO_TEST_QAPI_VALIDATE("attr name not present", "trace-event-get-state/arg-type", false,
                           "{\"name\":\"test\", \"blah\":123}");
     DO_TEST_QAPI_VALIDATE("variant", "blockdev-add/arg-type", true,
-- 
2.40.1




[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