diff mbox series

[v2,22/39] tests/qtest: migration-test: Disable IO redirection for win32

Message ID 20220920103159.1865256-23-bmeng.cn@gmail.com
State New
Headers show
Series tests/qtest: Enable running qtest on Windows | expand

Commit Message

Bin Meng Sept. 20, 2022, 10:31 a.m. UTC
From: Bin Meng <bin.meng@windriver.com>

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>
---

Changes in v2:
- Change the place that sets IO redirection in the command line

 tests/qtest/migration-test.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Marc-André Lureau Sept. 22, 2022, 8:04 p.m. UTC | #1
On Tue, Sep 20, 2022 at 3:04 PM Bin Meng <bmeng.cn@gmail.com> wrote:

> From: Bin Meng <bin.meng@windriver.com>
>
> 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>
> ---
>
> Changes in v2:
> - Change the place that sets IO redirection in the command line
>

hmm ok,
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


>  tests/qtest/migration-test.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index 9925691ead..c87afad9e8 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -648,7 +648,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 = "";
>      }
> --
> 2.34.1
>
>
>
diff mbox series

Patch

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 9925691ead..c87afad9e8 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -648,7 +648,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 = "";
     }