summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Meng2022-09-25 13:30:17 +0200
committerThomas Huth2022-09-27 20:51:21 +0200
commit4dc8be388320b95ee965e28893381c9193eca663 (patch)
tree2bbf2289c0bf2b88b120ca7e316ceaee766966c9
parenttests/qtest: bios-tables-test: Adapt the case for win32 (diff)
downloadqemu-4dc8be388320b95ee965e28893381c9193eca663.tar.gz
qemu-4dc8be388320b95ee965e28893381c9193eca663.tar.xz
qemu-4dc8be388320b95ee965e28893381c9193eca663.zip
tests/qtest: migration-test: Disable IO redirection for win32
On Windows the QEMU executable is created via CreateProcess() and IO redirection does not work, so don't bother adding IO redirection to the command line. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220925113032.1949844-40-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--tests/qtest/migration-test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 4728d528bb..3db1177377 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -647,7 +647,16 @@ static int test_migrate_start(QTestState **from, QTestState **to,
}
if (!getenv("QTEST_LOG") && args->hide_stderr) {
+#ifndef _WIN32
ignore_stderr = "2>/dev/null";
+#else
+ /*
+ * On Windows the QEMU executable is created via CreateProcess() and
+ * IO redirection does not work, so don't bother adding IO redirection
+ * to the command line.
+ */
+ ignore_stderr = "";
+#endif
} else {
ignore_stderr = "";
}