[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.9 31/47] qapi: Fix detection of doc / expr
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-2.9 31/47] qapi: Fix detection of doc / expression mismatch |
Date: |
Tue, 14 Mar 2017 15:35:21 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 03/13/2017 01:18 AM, Markus Armbruster wrote:
> This fixes the errors uncovered by the previous commit.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>
> expr = self.get_expr(False)
> if 'include' in expr:
> + self.reject_expr_doc()
> if len(expr) != 1:
Do you also need to handle 'pragma' expressions added earlier in the series?
/me goes and experiments:
diff --git i/tests/qapi-schema/doc-bad-expr.json
w/tests/qapi-schema/doc-bad-expr.json
index 0caa0ae..6c1204d 100644
--- i/tests/qapi-schema/doc-bad-expr.json
+++ w/tests/qapi-schema/doc-bad-expr.json
@@ -4,4 +4,5 @@
# @foo:
##
{ 'include': 'empty.json' }
+{ 'pragma': {} }
{ 'struct': 'foo', 'data': {} }
Oops - back to accepting the program.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH for-2.9 41/47] qapi: Factor add_name() calls out of the meta conditional, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 19/47] qapi: Prefer single-quoted strings more consistently, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 14/47] qapi: Prepare for requiring more complete documentation, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 26/47] qapi2texi: Generate reference to base type members, Markus Armbruster, 2017/03/13