qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] tests: add oob-test for qapi-schema


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/3] tests: add oob-test for qapi-schema
Date: Wed, 21 Mar 2018 07:52:06 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/21/2018 01:55 AM, Peter Xu wrote:
It simply tests the new OOB capability, and make sure the QAPISchema can
parse it correctly.

We also want negative tests that cover any new error messages in the qapi generator (such as 'allow-oob':'bad' diagnosing a non-bool, or 'allow-oob':false giving an error message that false is already the default such that only 'allow-oob':true makes sense).

Also, it's often easier to merge the positive test into the giant existing qapi-schema-test.json rather than creating a new positive test.

+++ b/tests/qapi-schema/oob-test.out
@@ -0,0 +1,6 @@
+object q_empty
+enum QType ['none', 'qnull', 'qnum', 'qstring', 'qdict', 'qlist', 'qbool']
+    prefix QTYPE
+module oob-test.json
+command an-oob-command None -> None
+   gen=True success_response=True boxed=False oob=True

At any rate, the positive test addition is good. I may beat you to submitting a v2 patch that covers the error messages that I'm thinking of.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]