mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-14 03:00:41 +02:00
platform/tests: use assert_ip4_route_exists() function
(cherry picked from commit a6cd0e7a29)
This commit is contained in:
parent
e775e4ab4f
commit
1851e6617a
1 changed files with 5 additions and 5 deletions
|
|
@ -75,11 +75,11 @@ test_ip4_route (void)
|
|||
accept_signal (route_added);
|
||||
|
||||
/* Add route */
|
||||
g_assert (!nm_platform_ip4_route_exists (ifindex, network, plen, metric));
|
||||
assert_ip4_route_exists (FALSE, DEVICE_NAME, network, plen, metric);
|
||||
no_error ();
|
||||
g_assert (nm_platform_ip4_route_add (ifindex, NM_IP_CONFIG_SOURCE_USER, network, plen, gateway, 0, metric, mss));
|
||||
no_error ();
|
||||
g_assert (nm_platform_ip4_route_exists (ifindex, network, plen, metric));
|
||||
assert_ip4_route_exists (TRUE, DEVICE_NAME, network, plen, metric);
|
||||
no_error ();
|
||||
accept_signal (route_added);
|
||||
|
||||
|
|
@ -89,11 +89,11 @@ test_ip4_route (void)
|
|||
accept_signal (route_changed);
|
||||
|
||||
/* Add default route */
|
||||
g_assert (!nm_platform_ip4_route_exists (ifindex, 0, 0, metric));
|
||||
assert_ip4_route_exists (FALSE, DEVICE_NAME, 0, 0, metric);
|
||||
no_error ();
|
||||
g_assert (nm_platform_ip4_route_add (ifindex, NM_IP_CONFIG_SOURCE_USER, 0, 0, gateway, 0, metric, mss));
|
||||
no_error ();
|
||||
g_assert (nm_platform_ip4_route_exists (ifindex, 0, 0, metric));
|
||||
assert_ip4_route_exists (TRUE, DEVICE_NAME, 0, 0, metric);
|
||||
no_error ();
|
||||
accept_signal (route_added);
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ test_ip4_route (void)
|
|||
/* Remove route */
|
||||
g_assert (nm_platform_ip4_route_delete (ifindex, network, plen, metric));
|
||||
no_error ();
|
||||
g_assert (!nm_platform_ip4_route_exists (ifindex, network, plen, metric));
|
||||
assert_ip4_route_exists (FALSE, DEVICE_NAME, network, plen, metric);
|
||||
accept_signal (route_removed);
|
||||
|
||||
/* Remove route again */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue