All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Juan Quintela <quintela@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] tests: Create fifo for test-io-channel-command
Date: Tue, 25 Oct 2022 13:57:23 +0100	[thread overview]
Message-ID: <87mt9k6owd.fsf@linaro.org> (raw)
In-Reply-To: <20221025105520.3016-1-quintela@redhat.com>


Juan Quintela <quintela@redhat.com> writes:

> Previous commit removed the creation of the fifo.  Without it, I get
> random failure during tests with high load, please consider
> reintroduce it.
>
> My guess is that there is a race between the two socats when we leave
> them to create the channel, better return to the previous behavior.
>
> I can't reproduce the problem when I run ./test-io-channel-command
> test alone, I need to do the make check.  And any (unrelated) change
> can make it dissapear.

I was chasing a similar problem with this test although I don't see it
timeout while running (I don't think our unit tests time out). I'm
provisionally queuing this to testing/next unless anyone objects.

>
> commit 76f5148c21b4543e62a6ad605ac4b44133421401
> Author: Marc-André Lureau <marcandre.lureau@redhat.com>
> Date:   Thu Oct 6 15:36:57 2022 +0400
>
>     tests/unit: make test-io-channel-command work on win32
>
>     This has been tested under msys2 & windows 11. I haven't tried to make
>     it work with other environments yet, but that should be enough to
>     validate the channel-command implementation anyway.
>
>     Here are the changes:
>     - drop tests/ from fifo/pipe path, to avoid directory issues
>     - use g_find_program() to lookup the socat executable (otherwise we
>     would need to change ChanneCommand to use G_SPAWN_SEARCH_PATH, and deal
>     with missing socat differently)
>     - skip the "echo" test when socat is missing as well
>
>     Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>     Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>     Message-Id: <20221006113657.2656108-7-marcandre.lureau@redhat.com>
>
> Failure:
>
> [178/178] 🌓 qemu:unit / test-io-channel-command
> [178/178] 🌔 qemu:unit / test-io-channel-command
> [178/178] 🌕 qemu:unit / test-io-channel-command
> [178/178] 🌖 qemu:unit / test-io-channel-command
> [178/178] 🌗 qemu:unit / test-io-channel-command
> [178/178] 🌘 qemu:unit / test-io-channel-command
> [178/178] 🌑 qemu:unit / test-io-channel-command
> [178/178] 🌒 qemu:unit / test-io-channel-command
> [178/178] 🌓 qemu:unit / test-io-channel-command
> ^CWARNING: Received SIGTERM, exiting
> 178/178 qemu:unit / test-io-channel-command                                    INTERRUPT      1127.75s   killed by signal 15 SIGTERM
>>>> MALLOC_PERTURB_=149 G_TEST_BUILDDIR=/scratch/qemu/multifd/x64/tests/unit G_TEST_SRCDIR=/mnt/code/qemu/multifd/tests/unit /scratch/qemu/multifd/x64/tests/unit/test-io-channel-command --tap -k
> ――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
> stderr:
> 2022/10/25 12:32:48 socat[463140] E mkfifo(test-io-channel-command.fifo, 438): File exists
>
> TAP parsing error: Too few tests run (expected 4, got 0)
> ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
>
> Summary of Failures:
>
> 178/178 qemu:unit / test-io-channel-command                           INTERRUPT      1127.75s   killed by signal 15 SIGTERM
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/unit/test-io-channel-command.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-channel-command.c
> index 7eee939c07..7e75f960f4 100644
> --- a/tests/unit/test-io-channel-command.c
> +++ b/tests/unit/test-io-channel-command.c
> @@ -48,6 +48,9 @@ static void test_io_channel_command_fifo(bool async)
>      }
>  
>      unlink(TEST_FIFO);
> +    if (mkfifo(TEST_FIFO, 0600) < 0) {
> +        abort();
> +    }
>      src = QIO_CHANNEL(qio_channel_command_new_spawn(srcargv,
>                                                      O_WRONLY,
>                                                      &error_abort));


-- 
Alex Bennée


  reply	other threads:[~2022-10-25 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 10:55 [PATCH] tests: Create fifo for test-io-channel-command Juan Quintela
2022-10-25 12:57 ` Alex Bennée [this message]
2022-10-25 13:08   ` Daniel P. Berrangé
2022-10-26 16:18     ` Alex Bennée
2022-10-27 12:25       ` Thomas Huth
2022-10-27 13:59         ` Alex Bennée
2022-10-27 14:26           ` Daniel P. Berrangé

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=87mt9k6owd.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.