From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3hp-0003Km-D9 for qemu-devel@nongnu.org; Tue, 29 Jul 2014 05:28:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC3hh-0001J0-Jw for qemu-devel@nongnu.org; Tue, 29 Jul 2014 05:28:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3hh-0001Iu-D3 for qemu-devel@nongnu.org; Tue, 29 Jul 2014 05:28:17 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6T9SFiF013917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 29 Jul 2014 05:28:15 -0400 Message-ID: <53D7692D.3060402@redhat.com> Date: Tue, 29 Jul 2014 11:28:13 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1406561658-6761-1-git-send-email-pbonzini@redhat.com> <1406561658-6761-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1406561658-6761-5-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization false positive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: imammedo@redhat.com, mst@redhat.com On 07/28/14 17:34, Paolo Bonzini wrote: > My version of IASL (from RHEL7) puts two newlines between the head comment > and the DefinitionBlock property. Kill all newlines after the comment, > so that normalize_asl works properly. > > Signed-off-by: Paolo Bonzini > --- > tests/bios-tables-test.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c > index 62771f7..045eb27 100644 > --- a/tests/bios-tables-test.c > +++ b/tests/bios-tables-test.c > @@ -487,7 +487,11 @@ static GString *normalize_asl(gchar *asl_code) > /* strip comments (different generation days) */ > comment = g_strstr_len(asl->str, asl->len, COMMENT_END); > if (comment) { > - asl = g_string_erase(asl, 0, comment + sizeof(COMMENT_END) - asl->str); > + comment += strlen(COMMENT_END); > + while (*comment == '\n') { > + comment++; > + } > + asl = g_string_erase(asl, 0, comment - asl->str); > } > > /* strip def block name (it has file path in it) */ > Reviewed-by: Laszlo Ersek