[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 03/24] tests: be a bit more strict cleaning up fifos
From: |
Alex Bennée |
Subject: |
[PULL v2 03/24] tests: be a bit more strict cleaning up fifos |
Date: |
Wed, 1 Mar 2023 15:15:43 +0000 |
When we re-factored we dropped the unlink() step which turns out to be
required for rmdir to do its thing. If we had been checking the return
value we would have noticed so lets do that with this fix.
Fixes: 68406d1085 (tests/unit: cleanups for test-io-channel-command)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230228190653.1602033-4-alex.bennee@linaro.org>
diff --git a/tests/unit/test-io-channel-command.c
b/tests/unit/test-io-channel-command.c
index 04b75ab3b4..c6e66a8c33 100644
--- a/tests/unit/test-io-channel-command.c
+++ b/tests/unit/test-io-channel-command.c
@@ -42,6 +42,7 @@ static void test_io_channel_command_fifo(bool async)
g_auto(GStrv) dstargv = g_strsplit(dstargs, " ", -1);
QIOChannel *src, *dst;
QIOChannelTest *test;
+ int err;
if (mkfifo(fifo, 0600)) {
g_error("mkfifo: %s", strerror(errno));
@@ -61,7 +62,10 @@ static void test_io_channel_command_fifo(bool async)
object_unref(OBJECT(src));
object_unref(OBJECT(dst));
- g_rmdir(tmpdir);
+ err = g_unlink(fifo);
+ g_assert(err == 0);
+ err = g_rmdir(tmpdir);
+ g_assert(err == 0);
}
static void test_io_channel_command_fifo_async(void)
--
2.39.2
- [PULL v2 04/24] tests: make fp-test less chatty when running from test suite, (continued)
- [PULL v2 04/24] tests: make fp-test less chatty when running from test suite, Alex Bennée, 2023/03/01
- [PULL v2 09/24] tests: skip the nios2 replay_kernel test, Alex Bennée, 2023/03/01
- [PULL v2 05/24] gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs, Alex Bennée, 2023/03/01
- [PULL v2 02/24] tests: add socat dependency for tests, Alex Bennée, 2023/03/01
- [PULL v2 06/24] gitlab: extend custom runners with base_job_template, Alex Bennée, 2023/03/01
- [PULL v2 08/24] testing: update ubuntu2004 to ubuntu2204, Alex Bennée, 2023/03/01
- [PULL v2 10/24] tests: add tuxrun baseline test to avocado, Alex Bennée, 2023/03/01
- [PULL v2 07/24] tests: don't run benchmarks for the tsan build, Alex Bennée, 2023/03/01
- [PULL v2 15/24] gitlab: Use plain docker in container-template.yml, Alex Bennée, 2023/03/01
- [PULL v2 01/24] tests: don't run socat tests on MacOS as well, Alex Bennée, 2023/03/01
- [PULL v2 03/24] tests: be a bit more strict cleaning up fifos,
Alex Bennée <=
- [PULL v2 11/24] tests/docker: Use binaries for debian-tricore-cross, Alex Bennée, 2023/03/01
- [PULL v2 18/24] tests/lcitool: append user setting stanza to dockerfiles, Alex Bennée, 2023/03/01
- [PULL v2 14/24] tests/dockerfiles: unify debian-toolchain references, Alex Bennée, 2023/03/01
- [PULL v2 20/24] tests/docker: use direct RUNC call to build containers, Alex Bennée, 2023/03/01
- [PULL v2 19/24] tests/docker: add USER stanzas to non-lci images, Alex Bennée, 2023/03/01
- [PULL v2 24/24] tests/avocado: disable BootLinuxPPC64 test in CI, Alex Bennée, 2023/03/01
- [PULL v2 23/24] tests/docker: add zstdtools to the images, Alex Bennée, 2023/03/01
- [PULL v2 13/24] cirrus.yml: Improve the windows_msys2_task, Alex Bennée, 2023/03/01
- [PULL v2 17/24] configure: expose the direct container command, Alex Bennée, 2023/03/01
- [PULL v2 16/24] tests: Ensure TAP version is printed before other messages, Alex Bennée, 2023/03/01