]> www.infradead.org Git - qemu-nvme.git/commit
tests/unit: cleanups for test-io-channel-command
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 27 Oct 2022 18:36:35 +0000 (19:36 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 31 Oct 2022 20:37:59 +0000 (20:37 +0000)
commit68406d10859385c88da73d0106254a7f47e6652e
treea5e2930a3f44fee048f0c6d920c98cd05f84ce35
parent14fd492b89b512735ac3abf8f5300db865129378
tests/unit: cleanups for test-io-channel-command

This test is hanging under heavy load when the two socats race while
trying to create the socket. I've tried various approaches to avoid
the race but it seems "creat=0" won't stop socat trying to create a
pipe if it executes first. In the end I just use a small sleep which
seems to be reliable enough on the load situations I've tried.

While I was there I also properly created a tmpdir for the socket to
live in which is cleaned up at the end of the test.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Message-Id: <20221027183637.2772968-30-alex.bennee@linaro.org>
tests/unit/test-io-channel-command.c