qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests: Create fifo for test-io-channel-command
@ 2022-10-25 10:55 Juan Quintela
  2022-10-25 12:57 ` Alex Bennée
  0 siblings, 1 reply; 7+ messages in thread
From: Juan Quintela @ 2022-10-25 10:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel P. Berrangé, Juan Quintela

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.

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));
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-27 14:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-25 10:55 [PATCH] tests: Create fifo for test-io-channel-command Juan Quintela
2022-10-25 12:57 ` Alex Bennée
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é

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