From: Thomas Huth <thuth@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: "Stefan Weil" <sw@weilnetz.de>,
"Markus Armbruster" <armbru@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Beraldo Leal" <bleal@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Michael Roth" <michael.roth@amd.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2 2/9] tests: fix test-io-channel-command on win32
Date: Mon, 6 Feb 2023 09:09:21 +0100 [thread overview]
Message-ID: <c39d58f3-872d-eedb-1f4e-6d26999390ac@redhat.com> (raw)
In-Reply-To: <20230129182414.583349-3-marcandre.lureau@redhat.com>
On 29/01/2023 19.24, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> socat "PIPE:"" on Windows are named pipes, not fifo path names.
>
> Fixes: commit 68406d10859 ("tests/unit: cleanups for test-io-channel-command")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> tests/unit/test-io-channel-command.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-channel-command.c
> index 096224962c..e76ef2daaa 100644
> --- a/tests/unit/test-io-channel-command.c
> +++ b/tests/unit/test-io-channel-command.c
> @@ -31,8 +31,12 @@ static char *socat = NULL;
>
> static void test_io_channel_command_fifo(bool async)
> {
> +#ifdef WIN32
> + const gchar *fifo = TEST_FIFO;
Question from a Windows ignorant: Won't this cause a race condition in case
someone is trying to run tests in parallel (i.e. shouldn't there be a random
part in the name)? Or are these named pipes local to the current process?
Thomas
> +#else
> g_autofree gchar *tmpdir = g_dir_make_tmp("qemu-test-io-channel.XXXXXX", NULL);
> g_autofree gchar *fifo = g_build_filename(tmpdir, TEST_FIFO, NULL);
> +#endif
> g_autofree gchar *srcargs = g_strdup_printf("%s - PIPE:%s,wronly", socat, fifo);
> g_autofree gchar *dstargs = g_strdup_printf("%s PIPE:%s,rdonly -", socat, fifo);
> g_auto(GStrv) srcargv = g_strsplit(srcargs, " ", -1);
> @@ -57,7 +61,9 @@ static void test_io_channel_command_fifo(bool async)
> object_unref(OBJECT(src));
> object_unref(OBJECT(dst));
>
> +#ifndef WIN32
> g_rmdir(tmpdir);
> +#endif
> }
>
>
next prev parent reply other threads:[~2023-02-06 8:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-29 18:24 [PATCH v2 0/9] Various win32 fixes & teach 'getfd' QMP command to import sockets marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 1/9] tests: fix path separator, use g_build_filename() marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 2/9] tests: fix test-io-channel-command on win32 marcandre.lureau
2023-02-06 8:09 ` Thomas Huth [this message]
2023-02-07 12:55 ` Marc-André Lureau
2023-02-06 8:13 ` Philippe Mathieu-Daudé
2023-01-29 18:24 ` [PATCH v2 3/9] tests/docker: fix a win32 error due to portability marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 4/9] osdep: implement qemu_socketpair() for win32 marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 5/9] qmp: 'add_client' actually expects sockets marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 6/9] qapi: implement conditional command arguments marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 7/9] qmp: teach 'getfd' to import sockets on win32 marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 8/9] libqtest: make qtest_qmp_add_client work " marcandre.lureau
2023-01-29 18:24 ` [PATCH v2 9/9] qtest: enable vnc-display test " marcandre.lureau
2023-02-06 6:36 ` [PATCH v2 0/9] Various win32 fixes & teach 'getfd' QMP command to import sockets Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c39d58f3-872d-eedb-1f4e-6d26999390ac@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=kraxel@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).