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>
This commit is contained in:
Bin Meng 2022-09-25 19:30:17 +08:00 committed by Thomas Huth
parent 4b83dd0efd
commit 4dc8be3883

View File

@ -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 = "";
}