From: Bin Meng Date: Sun, 25 Sep 2022 11:30:17 +0000 (+0800) Subject: tests/qtest: migration-test: Disable IO redirection for win32 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4dc8be388320b95ee965e28893381c9193eca663;p=qemu.git 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 Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-40-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth --- 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 = ""; }