Skip to content

Commit

Permalink
system/qtest: Restrict QTest API to system emulation
Browse files Browse the repository at this point in the history
Outside of system emulation, only qtest_enabled() can be used.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231212113016.29808-3-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
philmd authored and huth committed Dec 20, 2023
1 parent 65eac5b commit 60144cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/sysemu/qtest.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static inline bool qtest_enabled(void)
return qtest_allowed;
}

#ifndef CONFIG_USER_ONLY
void qtest_send_prefix(CharBackend *chr);
void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...);
void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words));
Expand All @@ -35,5 +36,6 @@ void qtest_server_set_send_handler(void (*send)(void *, const char *),
void qtest_server_inproc_recv(void *opaque, const char *buf);

int64_t qtest_get_virtual_clock(void);
#endif

#endif

0 comments on commit 60144cf

Please sign in to comment.