[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 40/92] fuzz: use qemu_get_exec_dir
From: |
Paolo Bonzini |
Subject: |
[PULL 40/92] fuzz: use qemu_get_exec_dir |
Date: |
Thu, 24 Sep 2020 05:22:22 -0400 |
Make things consistent with how softmmu/vl.c uses os_find_datadir.
Initializing the path to the executables will also be needed for
get_relocatable_path to work.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/qtest/fuzz/fuzz.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
index d3a3ccdec9..c4dc5fa629 100644
--- a/tests/qtest/fuzz/fuzz.c
+++ b/tests/qtest/fuzz/fuzz.c
@@ -153,6 +153,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char
***envp)
module_call_init(MODULE_INIT_QOM);
module_call_init(MODULE_INIT_LIBQOS);
+ qemu_init_exec_dir(**argv);
target_name = strstr(**argv, "-target-");
if (target_name) { /* The binary name specifies the target */
target_name += strlen("-target-");
@@ -165,7 +166,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char
***envp)
* location of the executable. Using this we add exec_dir/pc-bios to
* the datadirs.
*/
- bindir = g_path_get_dirname(**argv);
+ bindir = qemu_get_exec_dir();
datadir = g_build_filename(bindir, "pc-bios", NULL);
if (g_file_test(datadir, G_FILE_TEST_IS_DIR)) {
qemu_add_data_dir(datadir);
--
2.26.2
- [PULL 26/92] hw: megasas: return -1 when 'megasas_map_sgl' fails, (continued)
- [PULL 26/92] hw: megasas: return -1 when 'megasas_map_sgl' fails, Paolo Bonzini, 2020/09/24
- [PULL 35/92] configure: do not limit Hypervisor.framework test to Darwin, Paolo Bonzini, 2020/09/24
- [PULL 24/92] hw/char/serial-{isa, pci}: Alias QDEV properties from generic serial object, Paolo Bonzini, 2020/09/24
- [PULL 41/92] oslib-posix: default exec_dir to bindir, Paolo Bonzini, 2020/09/24
- [PULL 36/92] meson: qtest: set "depends" correctly, Paolo Bonzini, 2020/09/24
- [PULL 38/92] meson: report accelerator support, Paolo Bonzini, 2020/09/24
- [PULL 37/92] mtest2make: add support for introspected test dependencies, Paolo Bonzini, 2020/09/24
- [PULL 39/92] oslib: do not call g_strdup from qemu_get_exec_dir, Paolo Bonzini, 2020/09/24
- [PULL 46/92] vl: relocate paths to data directories, Paolo Bonzini, 2020/09/24
- [PULL 34/92] configure: move cocoa option to Meson, Paolo Bonzini, 2020/09/24
- [PULL 40/92] fuzz: use qemu_get_exec_dir,
Paolo Bonzini <=
- [PULL 42/92] cutils: introduce get_relocated_path, Paolo Bonzini, 2020/09/24
- [PULL 44/92] module: relocate path to modules, Paolo Bonzini, 2020/09/24
- [PULL 51/92] configure: use a platform-neutral prefix, Paolo Bonzini, 2020/09/24
- [PULL 50/92] ui: relocate paths to icons and translations, Paolo Bonzini, 2020/09/24
- [PULL 48/92] qemu-bridge-helper: relocate path to default ACL, Paolo Bonzini, 2020/09/24
- [PULL 52/92] hw/i386/q35: Remove unreachable Xen code on Q35 machine, Paolo Bonzini, 2020/09/24
- [PULL 43/92] oslib-posix: relocate path to /var, Paolo Bonzini, 2020/09/24
- [PULL 47/92] vl: relocate path to configuration file, Paolo Bonzini, 2020/09/24
- [PULL 45/92] net: relocate paths to helpers and scripts, Paolo Bonzini, 2020/09/24
- [PULL 53/92] exec: Remove MemoryRegion::global_locking field, Paolo Bonzini, 2020/09/24