mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-03 07:53:39 +02:00
gdbus: Clean up sockets and nonces from filesystem
When we close the GDBusServer, it should remove any non-abstract Unix sockets or TCP nonce files it created from the filesystem. Fixes #1808
This commit is contained in:
@@ -1351,12 +1351,16 @@ test_nonce_tcp (void)
|
||||
g_error_free (error);
|
||||
g_assert (c == NULL);
|
||||
|
||||
g_free (nonce_file);
|
||||
/* Recreate the nonce-file so we can ensure the server deletes it when stopped. */
|
||||
g_assert_cmpint (g_creat (nonce_file, 0600), !=, -1);
|
||||
|
||||
g_dbus_server_stop (server);
|
||||
g_object_unref (server);
|
||||
server = NULL;
|
||||
|
||||
g_assert_false (g_file_test (nonce_file, G_FILE_TEST_EXISTS));
|
||||
g_free (nonce_file);
|
||||
|
||||
g_main_loop_quit (service_loop);
|
||||
g_thread_join (service_thread);
|
||||
|
||||
|
Reference in New Issue
Block a user