mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 16:20:14 +01:00
core/tests: avoid deprecated g_main_run()/g_main_loop_unref() in test
These are deprecated. Also, they are nowadays implemented as macros that expand to #define g_main_run(loop) g_main_loop_run(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_run) This can cause compilation failure (in some environments).
This commit is contained in:
parent
dbfbbed53c
commit
de6f0bc6db
1 changed files with 2 additions and 3 deletions
|
|
@ -118,13 +118,13 @@ test_nm_utils_kill_child_async_do (const char *name, pid_t pid, int sig, guint32
|
|||
timeout_id = g_timeout_add_seconds (5, test_nm_utils_kill_child_async_fail_cb, &data);
|
||||
|
||||
data.loop = g_main_loop_new (NULL, FALSE);
|
||||
g_main_run (data.loop);
|
||||
g_main_loop_run (data.loop);
|
||||
|
||||
g_assert (data.called);
|
||||
success = g_source_remove (timeout_id);
|
||||
g_assert (success);
|
||||
|
||||
g_main_destroy (data.loop);
|
||||
g_main_loop_unref (data.loop);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -578,4 +578,3 @@ main (int argc, char **argv)
|
|||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue