NetworkManager/shared
Thomas Haller d34e6193da
tests: avoid race condition in nmtstc_service_cleanup()
It seems it can happen that the service is not yet unregistered from the
D-Bus broker, even if we already reaped the PID.

    /builds/NetworkManager/NetworkManager/tools/run-nm-test.sh --called-from-make /builds/NetworkManager/NetworkManager/build    --launch-dbus=auto /builds/NetworkManager/NetworkManager/build/libnm/tests/test-nm-client
    --- stdout ---
    /libnm/device-added:
    nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=0
    --- stderr ---
    **
    test:ERROR:../shared/nm-test-utils-impl.c:216:nmtstc_service_cleanup: assertion failed: (!name_exists(info->bus, "org.freedesktop.NetworkManager"))

Workaround by waiting a bit.

We now iterate the main GMainContext, unlike before. But that
should not cause any problems for the test.

(cherry picked from commit 1b8ccacc5d)
(cherry picked from commit d10d14d7ba)
2020-11-24 13:15:59 +01:00
..
c-list shared/c-list: reimport 2020-06-03 22:00:56 +02:00
c-rbtree shared/c-rbtree: reimport 2020-06-03 22:08:05 +02:00
c-siphash shared/c-siphash: reimport 2020-06-03 22:10:22 +02:00
c-stdaux shared/c-stdaux: reimport 2020-06-03 22:05:14 +02:00
n-acd shared/n-acd: reimport 2020-06-03 22:14:39 +02:00
n-dhcp4 n-dhcp4/connection: avoid compiler warning in n_dhcp4_c_connection_connect() about fd_udp uninitialized 2020-08-17 15:39:44 +02:00
nm-glib-aux shared: add nm_strv_ptrarray_ensure() and nm_strv_ptrarray_find_first() helpers 2020-11-24 11:38:31 +01:00
nm-std-aux license: relicense "shared/nm-std-aux/nm-dbus-compat.h" under LGPL-2.1+ 2020-01-14 16:54:43 +01:00
nm-udev-aux shared/udev: don't use GIOChannel to watch plain file descriptor 2020-01-13 15:46:04 +01:00
nm-utils shared/tests: add nmtst_main_context_iterate_until_full() helper 2020-11-24 13:11:22 +01:00
systemd tests: add nmtst_extract_first_word_all() for testing 2020-06-24 09:02:17 +02:00
meson.build all: move "shared/nm-libnm-aux" to "libnm/nm-libnm-aux" 2020-06-11 10:53:50 +02:00
nm-default.h libnm: include "nm-libnm-utils.h" by default in libnm sources 2019-10-18 22:09:18 +02:00
nm-meta-setting.c libnm-core,cli: add VRF setting 2020-01-14 09:49:01 +01:00
nm-meta-setting.h libnm-core,cli: add VRF setting 2020-01-14 09:49:01 +01:00
nm-test-libnm-utils.h tests: add include guard to "nm-test-libnm-utils.h" header 2020-05-07 13:58:10 +02:00
nm-test-utils-impl.c tests: avoid race condition in nmtstc_service_cleanup() 2020-11-24 13:15:59 +01:00
nm-version-macros.h.in version: add NM_VERSION_1_26_4/NM_AVAILABLE_IN_1_26_4 macros 2020-08-26 11:57:07 +02:00