tests: acpi: improve tests reproducability
v3 cover tests: acpi: improve tests reproducability
ChangeLog since v1:
* fixup commit message in 2/2
* pickup Reviewed-bys and repost as v3
series should help to make tests more reproducable and not depend on IASL being installed. IASL will be required only is user needs to get textual diff of mismatching files.
Igor Mammedov (2):
tests: acpi: do not require IASL for dumping AML blobs
tests: acpi: do not skip tests when IASL is not installed
tests/bios-tables-test.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
Signature · 1 line
2.18.1
PATCH v3 1/2 tests: acpi: do not require IASL for dumping AML blobs
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.
--- tests/bios-tables-test.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
tests/bios-tables-test.c +4 -6
@@ -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); }/*
Signature · 1 line
2.18.1
PATCH v3 2/2 tests: acpi: do not skip tests when IASL is not installed
In reply to Igor Mammedovtests 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.
---
v2:
- fix typo in commit message
Eric Auger <[email protected]>
tests/bios-tables-test.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
tests/bios-tables-test.c +14 -1
@@ -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); }
Signature · 1 line
2.18.1