[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/87] migration-test: Move hide_stderr to common commandline
From: |
Paolo Bonzini |
Subject: |
[PULL 03/87] migration-test: Move hide_stderr to common commandline |
Date: |
Wed, 18 Dec 2019 13:01:29 +0100 |
From: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
Tested-by: Cornelia Huck <address@hidden> #s390x
Tested-by: Laurent Vivier <address@hidden>
---
tests/migration-test.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/tests/migration-test.c b/tests/migration-test.c
index fbddcf2..0c01ed3 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -558,6 +558,7 @@ static int test_migrate_start(QTestState **from, QTestState
**to,
{
gchar *cmd_src, *cmd_dst;
gchar *cmd_source, *cmd_target;
+ const gchar *ignore_stderr;
char *bootpath = NULL;
char *extra_opts = NULL;
char *shmem_path = NULL;
@@ -661,24 +662,19 @@ static int test_migrate_start(QTestState **from,
QTestState **to,
g_free(extra_opts);
if (hide_stderr) {
- gchar *tmp;
- tmp = g_strdup_printf("%s 2>/dev/null", cmd_src);
- g_free(cmd_src);
- cmd_src = tmp;
-
- tmp = g_strdup_printf("%s 2>/dev/null", cmd_dst);
- g_free(cmd_dst);
- cmd_dst = tmp;
+ ignore_stderr = "2>/dev/null";
+ } else {
+ ignore_stderr = "";
}
- cmd_source = g_strdup_printf("%s %s",
- cmd_src, opts_src);
+ cmd_source = g_strdup_printf("%s %s %s",
+ cmd_src, opts_src, ignore_stderr);
g_free(cmd_src);
*from = qtest_init(cmd_source);
g_free(cmd_source);
- cmd_target = g_strdup_printf("%s %s",
- cmd_dst, opts_dst);
+ cmd_target = g_strdup_printf("%s %s %s",
+ cmd_dst, opts_dst, ignore_stderr);
g_free(cmd_dst);
*to = qtest_init(cmd_target);
g_free(cmd_target);
--
1.8.3.1
- [PULL 00/87] Misc patches for 2019-12-18, Paolo Bonzini, 2019/12/18
- [PULL 01/87] kvm: Reallocate dirty_bmap when we change a slot, Paolo Bonzini, 2019/12/18
- [PULL 02/87] migration-test: Create cmd_soure and cmd_target, Paolo Bonzini, 2019/12/18
- [PULL 03/87] migration-test: Move hide_stderr to common commandline,
Paolo Bonzini <=
- [PULL 04/87] migration-test: Move -machine to common commandline, Paolo Bonzini, 2019/12/18
- [PULL 06/87] migration-test: Move shmem handling to common commandline, Paolo Bonzini, 2019/12/18
- [PULL 05/87] migration-test: Move memory size to common commandline, Paolo Bonzini, 2019/12/18
- [PULL 07/87] migration-test: Move -name handling to common commandline, Paolo Bonzini, 2019/12/18
- [PULL 08/87] migration-test: Move -serial handling to common commandline, Paolo Bonzini, 2019/12/18
- [PULL 09/87] migration-test: Move -incomming handling to common commandline, Paolo Bonzini, 2019/12/18
- [PULL 14/87] tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c, Paolo Bonzini, 2019/12/18
- [PULL 15/87] vl: extract accelerator option processing to a separate function, Paolo Bonzini, 2019/12/18
- [PULL 13/87] vl: move icount configuration earlier, Paolo Bonzini, 2019/12/18
- [PULL 12/87] memory: do not look at current_machine->accel, Paolo Bonzini, 2019/12/18