From patchwork Thu Mar 16 06:28:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 9627395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 15D19604A9 for ; Thu, 16 Mar 2017 06:56:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06C31285EF for ; Thu, 16 Mar 2017 06:56:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF5E22863B; Thu, 16 Mar 2017 06:56:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8953E285EF for ; Thu, 16 Mar 2017 06:56:42 +0000 (UTC) Received: from localhost ([::1]:41251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coPKz-00049R-JU for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Mar 2017 02:56:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coOtZ-0006CZ-KS for qemu-devel@nongnu.org; Thu, 16 Mar 2017 02:28:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coOtS-0007B8-OE for qemu-devel@nongnu.org; Thu, 16 Mar 2017 02:28:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43074) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1coOtS-00078K-DY for qemu-devel@nongnu.org; Thu, 16 Mar 2017 02:28:14 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D3CD80467 for ; Thu, 16 Mar 2017 06:28:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3D3CD80467 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=armbru@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3D3CD80467 Received: from blackfin.pond.sub.org (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A41217BBD for ; Thu, 16 Mar 2017 06:28:14 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 65AE511384DA; Thu, 16 Mar 2017 07:28:06 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 16 Mar 2017 07:28:05 +0100 Message-Id: <1489645685-4750-50-git-send-email-armbru@redhat.com> In-Reply-To: <1489645685-4750-1-git-send-email-armbru@redhat.com> References: <1489645685-4750-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 16 Mar 2017 06:28:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL for 2.9 49/49] qapi: Fix a misleading parser error message X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP When choking on a token where an expression is expected, we report 'Expected "{", "[" or string'. Close, but no cigar. Fix it to Expected '"{", "[", string, boolean or "null"'. Missed in commit e53188a. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1489582656-31133-48-git-send-email-armbru@redhat.com> --- scripts/qapi.py | 3 ++- tests/qapi-schema/trailing-comma-list.err | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index d19300d..e88c047 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -519,7 +519,8 @@ class QAPISchemaParser(object): expr = self.val self.accept() else: - raise QAPIParseError(self, 'Expected "{", "[" or string') + raise QAPIParseError(self, 'Expected "{", "[", string, ' + 'boolean or "null"') return expr def get_doc(self, info): diff --git a/tests/qapi-schema/trailing-comma-list.err b/tests/qapi-schema/trailing-comma-list.err index 24c24b0..212e14a 100644 --- a/tests/qapi-schema/trailing-comma-list.err +++ b/tests/qapi-schema/trailing-comma-list.err @@ -1 +1 @@ -tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[" or string +tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[", string, boolean or "null"