diff options
-rw-r--r-- | tests/bios-tables-test.c | 2 | ||||
-rw-r--r-- | tests/boot-sector.c | 8 | ||||
-rw-r--r-- | tests/boot-sector.h | 6 | ||||
-rw-r--r-- | tests/pxe-test.c | 2 | ||||
-rw-r--r-- | tests/vmgenid-test.c | 2 |
5 files changed, 11 insertions, 9 deletions
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 2b332ed3c1..65b271a173 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -668,7 +668,7 @@ static void test_acpi_one(const char *params, test_data *data) qtest_start(args); - boot_sector_test(); + boot_sector_test(global_qtest); data->tables = g_array_new(false, true, sizeof(AcpiSdtTable)); test_acpi_rsdp_address(data); diff --git a/tests/boot-sector.c b/tests/boot-sector.c index be29d5bb9b..c373f0e715 100644 --- a/tests/boot-sector.c +++ b/tests/boot-sector.c @@ -5,7 +5,7 @@ * * Authors: * Michael S. Tsirkin <mst@redhat.com> - * Victor Kaplansky <victork@redhat.com> + * Victor Kaplansky <victork@redhat.com> * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. @@ -130,7 +130,7 @@ int boot_sector_init(char *fname) } /* Loop until signature in memory is OK. */ -void boot_sector_test(void) +void boot_sector_test(QTestState *qts) { uint8_t signature_low; uint8_t signature_high; @@ -146,8 +146,8 @@ void boot_sector_test(void) * instruction. */ for (i = 0; i < TEST_CYCLES; ++i) { - signature_low = readb(SIGNATURE_ADDR); - signature_high = readb(SIGNATURE_ADDR + 1); + signature_low = qtest_readb(qts, SIGNATURE_ADDR); + signature_high = qtest_readb(qts, SIGNATURE_ADDR + 1); signature = (signature_high << 8) | signature_low; if (signature == SIGNATURE) { break; diff --git a/tests/boot-sector.h b/tests/boot-sector.h index 35d61c7e2b..6ee6bb4d97 100644 --- a/tests/boot-sector.h +++ b/tests/boot-sector.h @@ -5,7 +5,7 @@ * * Authors: * Michael S. Tsirkin <mst@redhat.com> - * Victor Kaplansky <victork@redhat.com> + * Victor Kaplansky <victork@redhat.com> * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. @@ -14,11 +14,13 @@ #ifndef TEST_BOOT_SECTOR_H #define TEST_BOOT_SECTOR_H +#include "libqtest.h" + /* Create boot disk file. fname must be a suitable string for mkstemp() */ int boot_sector_init(char *fname); /* Loop until signature in memory is OK. */ -void boot_sector_test(void); +void boot_sector_test(QTestState *qts); /* unlink boot disk file. */ void boot_sector_cleanup(const char *fname); diff --git a/tests/pxe-test.c b/tests/pxe-test.c index 5ca84805eb..6e3679672c 100644 --- a/tests/pxe-test.c +++ b/tests/pxe-test.c @@ -71,7 +71,7 @@ static void test_pxe_one(const testdef_t *test, bool ipv6) test->model); qtest_start(args); - boot_sector_test(); + boot_sector_test(global_qtest); qtest_quit(global_qtest); g_free(args); } diff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c index 7190e680dc..2ec274e37c 100644 --- a/tests/vmgenid-test.c +++ b/tests/vmgenid-test.c @@ -45,7 +45,7 @@ static uint32_t acpi_find_vgia(void) int i; /* Wait for guest firmware to finish and start the payload. */ - boot_sector_test(); + boot_sector_test(global_qtest); /* Tables should be initialized now. */ rsdp_offset = acpi_find_rsdp_address(); |