qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: imammedo@redhat.com, lersek@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization false positive
Date: Mon, 28 Jul 2014 17:34:17 +0200	[thread overview]
Message-ID: <1406561658-6761-5-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1406561658-6761-1-git-send-email-pbonzini@redhat.com>

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 <pbonzini@redhat.com>
---
 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) */
-- 
1.8.3.1

  parent reply	other threads:[~2014-07-28 15:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 15:34 [Qemu-devel] [PATCH v4 0/5] ACPI fixes for QEMU 2.1 Paolo Bonzini
2014-07-28 15:34 ` [Qemu-devel] [PATCH 1/5] acpi-dsdt: procedurally generate _PRT Paolo Bonzini
2014-07-28 15:34 ` [Qemu-devel] [PATCH 2/5] pc: hack for migration compatibility from QEMU 2.0 Paolo Bonzini
2014-07-28 15:34 ` [Qemu-devel] [PATCH 3/5] pc: future-proof migration-compatibility of ACPI tables Paolo Bonzini
2014-07-28 15:59   ` Michael S. Tsirkin
2014-07-28 16:08     ` Paolo Bonzini
2014-07-28 21:20       ` Michael S. Tsirkin
2014-07-28 15:34 ` Paolo Bonzini [this message]
2014-07-29  9:28   ` [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization false positive Laszlo Ersek
2014-07-28 15:34 ` [Qemu-devel] [PATCH 5/5] pc: acpi: generate AML only for PCI0 devices if PCI bridge hotplug is disabled Paolo Bonzini
2014-07-28 21:27 ` [Qemu-devel] [PATCH v4 0/5] ACPI fixes for QEMU 2.1 Michael S. Tsirkin
2014-07-29  5:39   ` Paolo Bonzini
2014-07-29 10:25   ` Laszlo Ersek
2014-07-29 10:31     ` Michael S. Tsirkin
2014-07-29 10:39       ` Paolo Bonzini
2014-07-29 10:57         ` Laszlo Ersek
2014-07-29  6:16 ` Markus Armbruster
2014-07-29  6:23   ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2014-07-28 14:02 [Qemu-devel] [PATCH v3 " Paolo Bonzini
2014-07-28 14:02 ` [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization false positive Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406561658-6761-5-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).