]> www.infradead.org Git - users/dwmw2/qemu.git/commit
tests: acpi: reuse fetch_table() in vmgenid-test
authorIgor Mammedov <imammedo@redhat.com>
Thu, 27 Dec 2018 14:13:31 +0000 (15:13 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 18 Jan 2019 02:10:57 +0000 (21:10 -0500)
commitacee774b3dbeb7fcd294b1f96c1a286d39d9b495
treed54da65345c7929b26683024e295f4b1910c2223
parent59f9c6cc014309cde537842af2104b2f9956b0d6
tests: acpi: reuse fetch_table() in vmgenid-test

Move fetch_table() into acpi-utils.c renaming it to acpi_fetch_table()
and reuse it in vmgenid-test that reads RSDT and then tables it references,
to find and parse VMGNEID SSDT.
While at it wrap RSDT referenced tables enumeration into FOREACH macro
(similar to what we do with QLIST_FOREACH & co) to reuse it with bios and
vmgenid tests.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tests/acpi-utils.c
tests/acpi-utils.h
tests/bios-tables-test.c
tests/vmgenid-test.c