OSDN Git Service

tests/channel-helper: set blocking in main thread
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Oct 2022 11:36:54 +0000 (15:36 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 12 Oct 2022 15:22:01 +0000 (19:22 +0400)
commitbb06b0143b492203ab3d17640be1d819cfc33de7
treecd0670513e91886bcc3a78cdb3adc5c6f034737e
parent3f08376c2e1c3d3bb0b415fb1505b949d72655d4
tests/channel-helper: set blocking in main thread

The /io/channel/command/echo tests run the reader side and the writer
side with the same underlying command channel. Setting the blocking mode
of the fd/handles while the other end is already reading/writing may
create issues (deadlock in win32 when earlier attempt of this series
were using SetNamedPipeHandleState). Let's just do it before spawning
the threads to avoid further concurrency issues.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221006113657.2656108-4-marcandre.lureau@redhat.com>
tests/unit/io-channel-helpers.c