From eb062cfa7331dd90837177b9a5a6becab305b1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 22 Jul 2019 22:51:40 +0400 Subject: tests: add module loading test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test will simply check that modules can be loaded, and no symbols are missing. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- qtest.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qtest.c') diff --git a/qtest.c b/qtest.c index d8b4857c74..8b50e2783e 100644 --- a/qtest.c +++ b/qtest.c @@ -661,6 +661,15 @@ static void qtest_process_command(CharBackend *chr, gchar **words) qtest_send_prefix(chr); qtest_sendf(chr, "OK %"PRIi64"\n", (int64_t)qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)); + } else if (strcmp(words[0], "module_load") == 0) { + g_assert(words[1] && words[2]); + + qtest_send_prefix(chr); + if (module_load_one(words[1], words[2])) { + qtest_sendf(chr, "OK\n"); + } else { + qtest_sendf(chr, "FAIL\n"); + } } else if (qtest_enabled() && strcmp(words[0], "clock_set") == 0) { int64_t ns; int ret; -- cgit v1.2.3