From ab31b3373eba7e186282aac9f05c4303c309ac27 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Mon, 8 Jul 2019 05:24:09 -0400 Subject: tests: acpi: do not require IASL for dumping AML blobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IASL isn't needed when dumping ACPI tables from guest for rebuild purposes. So move this part out from IASL branch. Makes rebuild-expected-aml.sh work without IASL installed on host. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Message-Id: <20190708092410.11167-2-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index d863233..13bd166 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -597,12 +597,10 @@ static void test_acpi_one(const char *params, test_data *data) test_acpi_rxsdt_table(data); test_acpi_fadt_table(data); - if (iasl) { - if (getenv(ACPI_REBUILD_EXPECTED_AML)) { - dump_aml_files(data, true); - } else { - test_acpi_asl(data); - } + if (getenv(ACPI_REBUILD_EXPECTED_AML)) { + dump_aml_files(data, true); + } else if (iasl) { + test_acpi_asl(data); } /* -- cgit v1.1 From 7b9829bc6c7d84056c3a1c60737f71db4d2871e4 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Mon, 8 Jul 2019 05:24:10 -0400 Subject: tests: acpi: do not skip tests when IASL is not installed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests do binary comparision 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 Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190708092410.11167-3-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 13bd166..a356ac3 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"); + } 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); } -- cgit v1.1