From patchwork Fri Apr 8 08:02:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 607912 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 3qhBmJ2xSHz9t3t for ; Fri, 8 Apr 2016 18:03:28 +1000 (AEST) Received: from localhost ([::1]:54748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoRO2-0002QB-IZ for incoming@patchwork.ozlabs.org; Fri, 08 Apr 2016 04:03:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoRNF-0000lr-2B for qemu-devel@nongnu.org; Fri, 08 Apr 2016 04:02:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoRNA-0005iL-3P for qemu-devel@nongnu.org; Fri, 08 Apr 2016 04:02:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoRN9-0005i1-VB for qemu-devel@nongnu.org; Fri, 08 Apr 2016 04:02:32 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9046FC0467E4; Fri, 8 Apr 2016 08:02:31 +0000 (UTC) Received: from redhat.com (vpn1-6-229.ams2.redhat.com [10.36.6.229]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id u3882RBF019022; Fri, 8 Apr 2016 04:02:28 -0400 Date: Fri, 8 Apr 2016 11:02:27 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1460102154-16096-8-git-send-email-mst@redhat.com> References: <1460102154-16096-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1460102154-16096-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 07/15] tests/bios-tables-test: fix assert 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: , Cc: Wei Huang , Peter Maydell , Gabriel Somlo , "Dr . David Alan Gilbert" , Marcel Apfelbaum , Laszlo Ersek Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Marcel Apfelbaum Newer iasl does not add the aml file name to the Definition Block. See acpica tools commit 1ecbb3d5: "Emit the AMLFilename as a zero-length string. Allows the compiler to create the name later -- making it easier to rename the parent ASL (DSL) file." That causes an assert in acpi tests: tests/bios-tables-test.c:455:normalize_asl: assertion failed: (block_name) Fix it by striping the start of the definition block line until the first comma. The block name is always the first parameter and the grammar does not allow comma in between, so it is safe. Reported-by: Dr. David Alan Gilbert Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 0a80ddf..0352814 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -432,7 +432,7 @@ static bool load_asl(GArray *sdts, AcpiSdtTable *sdt) #define COMMENT_END "*/" #define DEF_BLOCK "DefinitionBlock (" -#define BLOCK_NAME_END ".aml" +#define BLOCK_NAME_END "," static GString *normalize_asl(gchar *asl_code) {