mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-21 20:20:10 +01:00
Often, during tests we want to assert against the logged messages. In fact, most tests enable assertions for all logging and enforce them with g_test_assert_expected_messages(). So, this is common. However, sometimes it can be cumbersome to understand which logging lines will be produced. For example, the next commits will call nm_dhcp_manager_get() during the tests, which initializes NMDhcpManager and logs a message which plugin was selected (or an additional warning, if the selected plugin was not found). The availability of the DHCP plugin depends on searching the path for "/usr/bin/dhclient", so from testing code it's hard to determine what will be logged. Instead, add a way to temporarily disable logging during testing. |
||
|---|---|---|
| .. | ||
| c-list | ||
| c-rbtree | ||
| c-siphash | ||
| n-acd | ||
| nm-utils | ||
| meson.build | ||
| nm-common-macros.h | ||
| nm-dbus-compat.h | ||
| nm-default.h | ||
| nm-dispatcher-api.h | ||
| nm-ethtool-utils.c | ||
| nm-ethtool-utils.h | ||
| nm-meta-setting.c | ||
| nm-meta-setting.h | ||
| nm-test-libnm-utils.h | ||
| nm-test-utils-impl.c | ||
| nm-version-macros.h.in | ||