NetworkManager/shared
Thomas Haller 0958a291b0
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)
(cherry picked from commit d34e6193da)
(cherry picked from commit b430298133)
(cherry picked from commit 2009025c46)
2021-06-10 19:32:51 +02:00
..
c-list shared/c-list: reimport 2019-04-14 17:22:04 +02:00
c-rbtree shared/c-rbtree: reimport 2019-04-14 17:23:01 +02:00
c-siphash shared/c-siphash: reimport 2019-04-14 17:23:25 +02:00
c-stdaux shared: patch c-stdaux.h to not include <stdatomic.h> 2019-04-14 17:17:52 +02:00
n-acd n-acd: fix leaking socket handle in n_acd_socket_new() when setsockopt() fails 2019-08-02 11:30:30 +02:00
n-dhcp4 n-dhcp4: fix BPF filter endianness issue 2020-09-08 14:57:59 +02:00
nm-glib-aux shared: add nm_auto_destroy_and_unref_gsource macro 2021-06-10 19:32:49 +02:00
nm-libnm-core-aux all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-libnm-core-intern all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-std-aux all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-udev-aux all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-utils shared/tests: add nmtst_main_context_iterate_until_full() helper 2021-06-10 19:32:51 +02:00
systemd shared: export systemd dns and hostname validation functions 2020-02-10 09:44:01 +01:00
meson.build systemd: merge branch systemd into master 2019-07-26 15:00:08 +02:00
nm-default.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-meta-setting.c libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-meta-setting.h libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-test-libnm-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-test-utils-impl.c tests: avoid race condition in nmtstc_service_cleanup() 2021-06-10 19:32:51 +02:00
nm-version-macros.h.in all: add 802-1x.optional property 2019-11-06 11:46:04 +01:00