qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] tests: acpi: do not skip tests when IASL is not installed
Date: Thu, 4 Jul 2019 11:33:19 +0200	[thread overview]
Message-ID: <c553e0b6-95e2-af3c-47b8-7db84f77a532@redhat.com> (raw)
In-Reply-To: <20190704082736.25258-3-imammedo@redhat.com>

On 7/4/19 10:27 AM, Igor Mammedov wrote:
> tests do binary comparition so we can check tables without
> IASL. Move IASL condition right before decompilation step
> and skip it if IASL is not installed.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  tests/bios-tables-test.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 13bd166b81..a356ac3489 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -389,6 +389,14 @@ static void test_acpi_asl(test_data *data)
>          all_tables_match = all_tables_match &&
>              test_acpi_find_diff_allowed(exp_sdt);
>  
> +        /*
> +         * don't try to decompile if IASL isn't present, in this case user
> +         * will just 'get binary file mismatch' warnings and test failure
> +         */
> +        if (!iasl) {
> +            continue;
> +        }
> +
>          err = load_asl(data->tables, sdt);
>          asl = normalize_asl(sdt->asl);
>  
> @@ -431,6 +439,11 @@ static void test_acpi_asl(test_data *data)
>          g_string_free(asl, true);
>          g_string_free(exp_asl, true);
>      }
> +    if (!iasl && !all_tables_match) {
> +        fprintf(stderr, "to see ASL diff between mismatched files install IASL,"
> +                " rebuild QEMU from scratch and re-run tests with V=1"
> +                " environment variable set");

I guess remember Thomas asked to use g_printerr() instead of fprintf()
in tests/*.c.

Anyway,
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> +    }
>      g_assert(all_tables_match);
>  
>      free_test_data(&exp_data);
> @@ -599,7 +612,7 @@ static void test_acpi_one(const char *params, test_data *data)
>  
>      if (getenv(ACPI_REBUILD_EXPECTED_AML)) {
>          dump_aml_files(data, true);
> -    } else if (iasl) {
> +    } else {
>          test_acpi_asl(data);
>      }
>  
> 


  reply	other threads:[~2019-07-04  9:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04  8:27 [Qemu-devel] [PATCH 0/2] tests: acpi: improve tests reproducability Igor Mammedov
2019-07-04  8:27 ` [Qemu-devel] [PATCH 1/2] tests: acpi: do not require IASL for dumping AML blobs Igor Mammedov
2019-07-04  9:29   ` Philippe Mathieu-Daudé
2019-07-04 12:06   ` Auger Eric
2019-07-04  8:27 ` [Qemu-devel] [PATCH 2/2] tests: acpi: do not skip tests when IASL is not installed Igor Mammedov
2019-07-04  9:33   ` Philippe Mathieu-Daudé [this message]
2019-07-04 12:39     ` Igor Mammedov
2019-07-04 12:15   ` Auger Eric
2019-07-04 12:40   ` [Qemu-devel] [PATCH v2 " Igor Mammedov
2019-07-04 21:25 ` [Qemu-devel] [PATCH 0/2] tests: acpi: improve tests reproducability Michael S. Tsirkin

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=c553e0b6-95e2-af3c-47b8-7db84f77a532@redhat.com \
    --to=philmd@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).