diff options
author | Claudio Fontana <cfontana@suse.de> | 2020-10-13 21:21:23 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-22 11:53:54 -0400 |
commit | 9b1c911654e9d4937f10cb347cf581d50771ee5b (patch) | |
tree | f5dd92c503917b9fbe2798f48a706eafa88693c9 /tests | |
parent | c51a5a23d87be2cfd8e2d739d11475b251f398cb (diff) | |
download | qemu-9b1c911654e9d4937f10cb347cf581d50771ee5b.zip qemu-9b1c911654e9d4937f10cb347cf581d50771ee5b.tar.gz qemu-9b1c911654e9d4937f10cb347cf581d50771ee5b.tar.bz2 |
replay: do not build if TCG is not available
this fixes non-TCG builds broken recently by replay reverse debugging.
Stub the needed functions in stub/, splitting roughly between functions
needed only by system emulation, by system emulation and tools,
and by everyone. This includes duplicating some code in replay/, and
puts the logic for non-replay related events in the replay/ module (+
the stubs), so this should be revisited in the future.
Surprisingly, only _one_ qtest was affected by this, ide-test.c, which
resulted in a buzz as the bh events were never delivered, and the bh
never executed.
Many other subsystems _should_ have been affected.
This fixes the immediate issue, however a better way to group replay
functionality to TCG-only code could be developed in the long term.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20201013192123.22632-4-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ptimer-test-stubs.c | 5 | ||||
-rw-r--r-- | tests/qtest/qmp-cmd-test.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/ptimer-test-stubs.c b/tests/ptimer-test-stubs.c index e935a13..7f801a4 100644 --- a/tests/ptimer-test-stubs.c +++ b/tests/ptimer-test-stubs.c @@ -122,8 +122,3 @@ void qemu_bh_delete(QEMUBH *bh) { g_free(bh); } - -void replay_bh_schedule_event(QEMUBH *bh) -{ - bh->cb(bh->opaque); -} diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c index 8a4c570..1c7186e 100644 --- a/tests/qtest/qmp-cmd-test.c +++ b/tests/qtest/qmp-cmd-test.c @@ -31,6 +31,9 @@ static int query_error_class(const char *cmd) #ifndef CONFIG_SPICE { "query-spice", ERROR_CLASS_COMMAND_NOT_FOUND }, #endif +#ifndef CONFIG_TCG + { "query-replay", ERROR_CLASS_COMMAND_NOT_FOUND }, +#endif #ifndef CONFIG_VNC { "query-vnc", ERROR_CLASS_GENERIC_ERROR }, { "query-vnc-servers", ERROR_CLASS_GENERIC_ERROR }, |