summaryrefslogtreecommitdiff
path: root/tests/acpi-test.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-09acpi-test: issue errors instead of warnings when possibleMarcel Apfelbaum1-9/+17
If the expected (offline) acpi tables loaded correctly, it is safe to assume the iasl installation is OK and issue an error if the actual tables failed to load. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-03-09acpi-test: retain both asl and aml files on failureMarcel Apfelbaum1-7/+9
Updated the error message while at it. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi unit-test: do not fail on asl mismatchMarcel Apfelbaum1-2/+11
The asl comparison will break every time the ACPI tables are updated. This may break the git bisect. Instead of failing print a warning on stderr including the retained asl files, so they can be compared offline. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi unit-test: resolved iasl crashMarcel Apfelbaum1-3/+15
It seems that iasl has an issue when disassembles some ACPI tables using the command line: iasl -e DSDT -e SSDT -d HPET Modified the iasl command line to "iasl -d HPET" until the problem is solved. The command line remained the same for DSDT and SSDT tables. Reported-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi unit-test: renamed ssdt_tables to tablesMarcel Apfelbaum1-24/+24
Just a refactoring, ssdt_tables name was confusing as it included other tables as well. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26tests: fix acpi to work on bigendian hostAlexey Kardashevskiy1-3/+3
Double endianness convertion make this test failing on POWERPC machine running in big-endian. This fixes the test to success on big-endian host. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi unit-test: hook to rebuild expected aml filesMarcel Apfelbaum1-5/+25
When running the test with TEST_ACPI_REBUILD_AML=y environment variable, the test will rebuild and validate the expected aml files. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi unit-test: extract iasl executable from configurationMarcel Apfelbaum1-23/+8
The test checked if iasl is installed by running "iasl" and checking the error output. It is better to use the iasl executable as appears in configuration. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi unit-test: compare DSDT and SSDT tables against expected valuesMarcel Apfelbaum1-21/+240
This test will run only if iasl is installed on the host machine. The test plan: 1. Dumps the ACPI tables as AML on the disk. 2. Runs iasl to disassembly the tables into ASL files. 3. Runs iasl to disassembly the offline AML files into ASL files. 4. Compares the ASL files. The test runs for both default machine and q35. In case the test fails, it can be easily tweaked to show the differences between the ASL files and understand the issue. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-01acpi unit-test: Remove temporary disk after testFam Zheng1-1/+4
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-11acpi unit-test: adjust the test data structure for better handlingMarcel Apfelbaum1-23/+32
Ensure more then one instance of test_data may exist at a given time. It will help to compare different acpi table versions. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-11acpi unit-test: load and check facs tableMarcel Apfelbaum1-0/+18
FACS table does not have a checksum, so we can check at least the signature (existence). Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-10acpi unit-test: verify signature and checksumMarcel Apfelbaum1-20/+252
Read all ACPI tables from guest - will be useful for further unit tests. Follow pointers between ACPI tables checking signature and format for correctness. Verify checksum for all tables. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-10acpi-test: basic acpi unit-testMichael S. Tsirkin1-0/+135
We run bios, and boot a minimal boot sector that immediately halts. Then poke at memory to find ACPI tables. This only checks that RSDP is there. More will be added later. Cc: Andreas Färber <afaerber@suse.de> Cc: Markus Armbruster <armbru@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>