mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
Merge branch 'leak-fixes' into 'main'
tests: Various small test fixes for valgrind See merge request GNOME/glib!2711
This commit is contained in:
commit
36da11550c
@ -241,6 +241,8 @@ test_g_file_info_modification_time (void)
|
||||
g_assert_cmpuint (new_nsecs, ==, nsecs + 100);
|
||||
g_assert_cmpuint (new_nsecs, >=, new_usecs * 1000);
|
||||
g_assert_cmpuint (new_nsecs, <, (new_usecs + 1) * 1000);
|
||||
|
||||
g_date_time_unref (new_dt_usecs);
|
||||
}
|
||||
|
||||
/* Clean up. */
|
||||
@ -363,6 +365,8 @@ test_g_file_info_access_time (void)
|
||||
g_assert_cmpuint (new_nsecs, ==, nsecs + 100);
|
||||
g_assert_cmpuint (new_nsecs, >=, new_usecs * 1000);
|
||||
g_assert_cmpuint (new_nsecs, <, (new_usecs + 1) * 1000);
|
||||
|
||||
g_date_time_unref (new_dt_usecs);
|
||||
}
|
||||
|
||||
/* Clean up. */
|
||||
@ -496,6 +500,8 @@ test_g_file_info_creation_time (void)
|
||||
g_assert_cmpuint (new_nsecs, ==, nsecs + 100);
|
||||
g_assert_cmpuint (new_nsecs, >=, new_usecs * 1000);
|
||||
g_assert_cmpuint (new_nsecs, <, (new_usecs + 1) * 1000);
|
||||
|
||||
g_date_time_unref (new_dt_usecs);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -136,16 +136,6 @@ server_notify_is_running (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
timeout (gpointer user_data)
|
||||
{
|
||||
GNotificationServer *server = user_data;
|
||||
|
||||
g_notification_server_stop (server);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
basic (void)
|
||||
{
|
||||
@ -162,7 +152,6 @@ basic (void)
|
||||
g_signal_connect (server, "notification-received", G_CALLBACK (notification_received), &received_count);
|
||||
g_signal_connect (server, "notification-removed", G_CALLBACK (notification_removed), &removed_count);
|
||||
g_signal_connect (server, "notify::is-running", G_CALLBACK (server_notify_is_running), loop);
|
||||
g_timeout_add_seconds (1, timeout, server);
|
||||
|
||||
g_main_loop_run (loop);
|
||||
|
||||
|
@ -103,7 +103,7 @@ glib_tests = {
|
||||
'slice' : {},
|
||||
'slice-color' : {},
|
||||
'slice-concurrent' : {},
|
||||
'slice-known-pages' : {},
|
||||
'slice-known-pages' : {'suite' : ['no-valgrind']},
|
||||
'slice-glib' : {},
|
||||
'slice-slab' : {},
|
||||
'slice-malloc' : {},
|
||||
|
@ -1109,3 +1109,19 @@
|
||||
fun:g_hash_table_insert
|
||||
fun:quark_new
|
||||
}
|
||||
|
||||
{
|
||||
xdg_mime_init_malloc
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
fun:xdg_mime_init
|
||||
}
|
||||
|
||||
{
|
||||
xdg_mime_init_calloc
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
...
|
||||
fun:xdg_mime_init
|
||||
}
|
Loading…
Reference in New Issue
Block a user