diff options
| author | Steve Sistare <steven.sistare@oracle.com> | 2025-10-01 08:34:01 -0700 |
|---|---|---|
| committer | Fabiano Rosas <farosas@suse.de> | 2025-10-01 17:09:21 -0300 |
| commit | 8e9f9981d6846515b2540439a80a0e16f93d4bd3 (patch) | |
| tree | 2b33f63e7a99e0cef2a7ff3cb9df3c96b1ff4721 /tests | |
| parent | e16d7a732124ccaf9960920a9b64f4cf95f8fdab (diff) | |
| download | focaccia-qemu-8e9f9981d6846515b2540439a80a0e16f93d4bd3.tar.gz focaccia-qemu-8e9f9981d6846515b2540439a80a0e16f93d4bd3.zip | |
tests/qtest: export qtest_qemu_binary
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/qemu-devel/1759332851-370353-10-git-send-email-steven.sistare@oracle.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/qtest/libqtest.c | 2 | ||||
| -rw-r--r-- | tests/qtest/libqtest.h | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index f3d4e0829a..6f76be12a4 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -357,7 +357,7 @@ void qtest_remove_abrt_handler(void *data) } } -static const char *qtest_qemu_binary(const char *var) +const char *qtest_qemu_binary(const char *var) { const char *qemu_bin; diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h index fd27521a9c..dc2cdd0b60 100644 --- a/tests/qtest/libqtest.h +++ b/tests/qtest/libqtest.h @@ -48,6 +48,15 @@ QTestState *qtest_initf(const char *fmt, ...) G_GNUC_PRINTF(1, 2); QTestState *qtest_vinitf(const char *fmt, va_list ap) G_GNUC_PRINTF(1, 0); /** + * qtest_qemu_binary: + * @var: environment variable name + * + * Look up @var and return its value as the qemu binary path. + * If @var is NULL, look up the default var name. + */ +const char *qtest_qemu_binary(const char *var); + +/** * qtest_init: * @extra_args: other arguments to pass to QEMU. CAUTION: these * arguments are subject to word splitting and shell evaluation. |