aboutsummaryrefslogtreecommitdiff
path: root/qtest.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-07-22 22:51:40 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2019-08-21 16:29:57 +0200
commiteb062cfa7331dd90837177b9a5a6becab305b1ca (patch)
tree875bc6e81edf355c9777ea5368d4852d631a8c39 /qtest.c
parent81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f (diff)
tests: add module loading test
This test will simply check that modules can be loaded, and no symbols are missing. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qtest.c')
-rw-r--r--qtest.c9
1 files changed, 9 insertions, 0 deletions
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;