[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/23] tests/qtest: Use g_setenv()
From: |
Thomas Huth |
Subject: |
[PULL 01/23] tests/qtest: Use g_setenv() |
Date: |
Tue, 30 Aug 2022 20:39:50 +0200 |
From: Bin Meng <bin.meng@windriver.com>
Windows does not provide a setenv() API, but glib does.
Replace setenv() call with the glib version.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220824094029.1634519-2-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/fuzz/generic_fuzz.c | 8 ++++----
tests/qtest/libqtest.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c
index 447ffe8178..afc1d20355 100644
--- a/tests/qtest/fuzz/generic_fuzz.c
+++ b/tests/qtest/fuzz/generic_fuzz.c
@@ -994,16 +994,16 @@ static GString
*generic_fuzz_predefined_config_cmdline(FuzzTarget *t)
g_assert(t->opaque);
config = t->opaque;
- setenv("QEMU_AVOID_DOUBLE_FETCH", "1", 1);
+ g_setenv("QEMU_AVOID_DOUBLE_FETCH", "1", 1);
if (config->argfunc) {
args = config->argfunc();
- setenv("QEMU_FUZZ_ARGS", args, 1);
+ g_setenv("QEMU_FUZZ_ARGS", args, 1);
g_free(args);
} else {
g_assert_nonnull(config->args);
- setenv("QEMU_FUZZ_ARGS", config->args, 1);
+ g_setenv("QEMU_FUZZ_ARGS", config->args, 1);
}
- setenv("QEMU_FUZZ_OBJECTS", config->objects, 1);
+ g_setenv("QEMU_FUZZ_OBJECTS", config->objects, 1);
return generic_fuzz_cmdline(t);
}
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 8c159eacf5..ad6860d774 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1424,7 +1424,7 @@ QTestState *qtest_inproc_init(QTestState **s, bool log,
const char* arch,
* way, qtest_get_arch works for inproc qtest.
*/
gchar *bin_path = g_strconcat("/qemu-system-", arch, NULL);
- setenv("QTEST_QEMU_BINARY", bin_path, 0);
+ g_setenv("QTEST_QEMU_BINARY", bin_path, 0);
g_free(bin_path);
return qts;
--
2.31.1
- [PULL 05/23] backends/tpm: Exclude headers and macros that don't exist on win32, (continued)
- [PULL 05/23] backends/tpm: Exclude headers and macros that don't exist on win32, Thomas Huth, 2022/08/30
- [PULL 09/23] tests/qtest: i440fx-test: Skip running request_{bios, pflash} for win32, Thomas Huth, 2022/08/30
- [PULL 03/23] tests: Use g_mkdir_with_parents(), Thomas Huth, 2022/08/30
- [PULL 06/23] tests/qtest: Adapt {m48t59,rtc}-test cases for win32, Thomas Huth, 2022/08/30
- [PULL 10/23] tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32, Thomas Huth, 2022/08/30
- [PULL 08/23] tests/qtest: Build cases that use memory-backend-file for posix only, Thomas Huth, 2022/08/30
- [PULL 11/23] tests/qtest: libqos: Drop inclusion of <sys/wait.h>, Thomas Huth, 2022/08/30
- [PULL 07/23] tests/qtest: Build e1000e-test for posix only, Thomas Huth, 2022/08/30
- [PULL 17/23] tests/vm: Add libslirp to the VM tests, Thomas Huth, 2022/08/30
- [PULL 19/23] tests/avocado: Fix trivial typo, Thomas Huth, 2022/08/30
- [PULL 01/23] tests/qtest: Use g_setenv(),
Thomas Huth <=
- [PULL 18/23] tests/avocado: Do not run tests that require libslirp if it is not available, Thomas Huth, 2022/08/30
- [PULL 21/23] gitlab-ci: Only use one process in Windows jobs for compilation, Thomas Huth, 2022/08/30
- [PULL 22/23] tests/qtest/ac97-test: Correct reference to driver, Thomas Huth, 2022/08/30
- [PULL 12/23] tests/qtest: libqos: Rename malloc.h to libqos-malloc.h, Thomas Huth, 2022/08/30
- [PULL 14/23] tests/qtest: machine-none-test: Use double quotes to pass the cpu option, Thomas Huth, 2022/08/30
- [PULL 13/23] tests/qtest: device-plug-test: Reverse the usage of double/single quotes, Thomas Huth, 2022/08/30
- [PULL 15/23] tests/qtest: npcm7xx_emc-test: Skip running test_{tx, rx} on win32, Thomas Huth, 2022/08/30
- [PULL 16/23] tests/qtest: prom-env-test: Use double quotes to pass the prom-env option, Thomas Huth, 2022/08/30
- [PULL 23/23] tests/avocado/migration: Get find_free_port() from the ports, Thomas Huth, 2022/08/30
- [PULL 20/23] docs/devel/testing: fix minor typo, Thomas Huth, 2022/08/30