Received: from eggs.gnu.org ([2001:4830:134:3::10]:37681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHrdg-0003Tj-II for qemu-devel@nongnu.org; Thu, 14 Aug 2014 05:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHrda-00032u-9J for qemu-devel@nongnu.org; Thu, 14 Aug 2014 05:48:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHrda-00032j-1k for qemu-devel@nongnu.org; Thu, 14 Aug 2014 05:48:02 -0400 From: Markus Armbruster References: <1407287673-20308-1-git-send-email-eblake@redhat.com> <1407287673-20308-8-git-send-email-eblake@redhat.com> Date: Thu, 14 Aug 2014 11:47:57 +0200 In-Reply-To: <1407287673-20308-8-git-send-email-eblake@redhat.com> (Eric Blake's message of "Tue, 5 Aug 2014 19:14:26 -0600") Message-ID: <87egwjjtbm.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 07/14] qapi: add some type check tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Luiz Capitulino , Fam Zheng , qemu-devel@nongnu.org, wenchaoqemu@gmail.com Eric Blake writes: > Demonstrate that the qapi generator silently parses confusing > types, which may cause other errors later on. Later patches > will update the expected results as the generator is made stricter. > > * tests/qapi-schema/data-array-empty.*: New files. > * tests/qapi-schema/data-array-unknown.*: Likewise. > * tests/qapi-schema/data-unknown.*: Likewise. > * tests/qapi-schema/data-int.*: Likewise. > * tests/qapi-schema/returns-unknown.*: Likewise. > * tests/qapi-schema/returns-int.*: Likewise. > * tests/qapi-schema/returns-array-bad.*: Likewise. > * tests/Makefile (check-qapi-schema-y): Run them. > > Signed-off-by: Eric Blake [...] > diff --git a/tests/qapi-schema/returns-array-bad.err b/tests/qapi-schema/returns-array-bad.err > new file mode 100644 > index 0000000..e69de29 > diff --git a/tests/qapi-schema/returns-array-bad.exit b/tests/qapi-schema/returns-array-bad.exit > new file mode 100644 > index 0000000..573541a > --- /dev/null > +++ b/tests/qapi-schema/returns-array-bad.exit > @@ -0,0 +1 @@ > +0 > diff --git a/tests/qapi-schema/returns-array-bad.json b/tests/qapi-schema/returns-array-bad.json > new file mode 100644 > index 0000000..76bf6df > --- /dev/null > +++ b/tests/qapi-schema/returns-array-bad.json > @@ -0,0 +1 @@ > +{ 'command': 'oops', 'data': [ 'str', 'str' ] } The file name suggests you want to test 'returns' rather than 'data' here. [...]