aboutsummaryrefslogtreecommitdiff
path: root/tests/boot-order-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/boot-order-test.c')
-rw-r--r--tests/boot-order-test.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c
index e70f5dedba..9d98c48a3d 100644
--- a/tests/boot-order-test.c
+++ b/tests/boot-order-test.c
@@ -13,9 +13,12 @@
#include "qemu/osdep.h"
#include "libqos/fw_cfg.h"
#include "libqtest.h"
-
+#include "qapi/qmp/qdict.h"
#include "hw/nvram/fw_cfg_keys.h"
+/* TODO actually test the results and get rid of this */
+#define qmp_discard_response(...) qobject_unref(qmp(__VA_ARGS__))
+
typedef struct {
const char *args;
uint64_t expected_boot;
@@ -30,10 +33,10 @@ static void test_a_boot_order(const char *machine,
{
uint64_t actual;
- global_qtest = qtest_startf("-nodefaults%s%s %s",
- machine ? " -M " : "",
- machine ?: "",
- test_args);
+ global_qtest = qtest_initf("-nodefaults%s%s %s",
+ machine ? " -M " : "",
+ machine ?: "",
+ test_args);
actual = read_boot_order();
g_assert_cmphex(actual, ==, expected_boot);
qmp_discard_response("{ 'execute': 'system_reset' }");