tests/unit/test-util-sockets: Remove temporary file after test
authorThomas Huth <thuth@redhat.com>
Mon, 26 Feb 2024 08:27:28 +0000 (09:27 +0100)
committerThomas Huth <thuth@redhat.com>
Fri, 1 Mar 2024 07:27:33 +0000 (08:27 +0100)
test-util-sockets leaves the temporary socket files around in the
temporary files folder. Let's better remove them at the end of the
testing.

Fixes: 4d3a329af5 ("tests/util-sockets: add abstract unix socket cases")
Message-ID: <20240226082728.249753-1-thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/unit/test-util-sockets.c

index 63909ccb2b544a326f7461e1ea00d0e76c881761..4c9dd0b2717a237249ec463176307a15f4dc00bf 100644 (file)
@@ -326,6 +326,7 @@ static void test_socket_unix_abstract(void)
         test_socket_unix_abstract_row(&matrix[i]);
     }
 
+    unlink(addr.u.q_unix.path);
     g_free(addr.u.q_unix.path);
 }