[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 17/17] bios-tables-test: ignore identical binaries
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v3 17/17] bios-tables-test: ignore identical binaries |
Date: |
Wed, 5 Jun 2019 16:00:50 -0400 |
when binary of the tables is identical, there is no need to run iasl
to check that they are functionally equivalent.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
tests/bios-tables-test.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index d80ea7f7f3..0ce55182f2 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -375,6 +375,20 @@ static void test_acpi_asl(test_data *data)
sdt = &g_array_index(data->tables, AcpiSdtTable, i);
exp_sdt = &g_array_index(exp_data.tables, AcpiSdtTable, i);
+ if (sdt->aml_len == exp_sdt->aml_len &&
+ !memcmp(sdt->aml, exp_sdt->aml, sdt->aml_len)) {
+ /* Identical table binaries: no need to disassemble. */
+ continue;
+ }
+
+ fprintf(stderr,
+ "acpi-test: Warning! %.4s binary file mismatch. "
+ "Actual [aml:%s], Expected [aml:%s].\n",
+ exp_sdt->aml, sdt->aml_file, exp_sdt->aml_file);
+
+ all_tables_match = all_tables_match &&
+ test_acpi_find_diff_allowed(exp_sdt);
+
err = load_asl(data->tables, sdt);
asl = normalize_asl(sdt->asl);
@@ -413,8 +427,6 @@ static void test_acpi_asl(test_data *data)
}
}
}
- all_tables_match = all_tables_match &&
- test_acpi_find_diff_allowed(exp_sdt);
}
g_string_free(asl, true);
g_string_free(exp_asl, true);
--
MST
- [Qemu-devel] [PULL v3 00/17] virtio, pci, pc: cleanups, features, Michael S. Tsirkin, 2019/06/05
- [Qemu-devel] [PULL v3 10/17] bios-tables-test: add diff allowed list, Michael S. Tsirkin, 2019/06/05
- [Qemu-devel] [PULL v3 14/17] bios-tables-test: list all tables that differ, Michael S. Tsirkin, 2019/06/05
- [Qemu-devel] [PULL v3 17/17] bios-tables-test: ignore identical binaries,
Michael S. Tsirkin <=
- Re: [Qemu-devel] [PULL v3 00/17] virtio, pci, pc: cleanups, features, Peter Maydell, 2019/06/06