mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-13 00:20:17 +01:00
platform/tests: workaround test failure for kernel bug
Unenslaving from a bridge can cause a spurious RTM_DELLINK signal. NMPlatform does raise those signals, but fixes the state of the cache afterwards. Workaround the test failure. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1285719
This commit is contained in:
parent
3ac6769e60
commit
dec682f6d1
1 changed files with 11 additions and 3 deletions
|
|
@ -290,9 +290,17 @@ test_slave (int master, int type, SignalData *master_changed)
|
|||
ensure_no_signal (link_removed);
|
||||
g_assert (nm_platform_link_release (NM_PLATFORM_GET, master, ifindex));
|
||||
g_assert_cmpint (nm_platform_link_get_master (NM_PLATFORM_GET, ifindex), ==, 0);
|
||||
accept_signals (link_added, 0, 1);
|
||||
accept_signals (link_changed, 1, 3);
|
||||
accept_signals (link_removed, 0, 1);
|
||||
if (link_changed->received_count > 0) {
|
||||
accept_signals (link_added, 0, 1);
|
||||
accept_signals (link_changed, 1, 3);
|
||||
accept_signals (link_removed, 0, 1);
|
||||
} else {
|
||||
/* Due to https://bugzilla.redhat.com/show_bug.cgi?id=1285719 , kernel might send a
|
||||
* wrong RTM_DELLINK message so that we instead see an removed+added signal. */
|
||||
accept_signal (link_added);
|
||||
ensure_no_signal (link_changed);
|
||||
accept_signal (link_removed);
|
||||
}
|
||||
accept_signals (master_changed, 1, 2);
|
||||
|
||||
ensure_no_signal (master_changed);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue