From: Paolo Bonzini Date: Mon, 28 Jul 2014 15:34:17 +0000 (+0200) Subject: bios-tables-test: fix ASL normalization false positive X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~672^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb348985abd3673b40c8af069c3e3b84f547b6f7;p=sdk%2Femulator%2Fqemu.git bios-tables-test: fix ASL normalization false positive 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- 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) */