mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 01:47:58 +02:00
initrd: add test for prefixed address in ip= argument
(cherry picked from commit 584e9048b3)
This commit is contained in:
parent
10f2600832
commit
58a6697e96
1 changed files with 4 additions and 2 deletions
|
|
@ -401,8 +401,9 @@ static void
|
|||
test_multiple_merge(void)
|
||||
{
|
||||
gs_unref_hashtable GHashTable *connections = NULL;
|
||||
const char *const *ARGV = NM_MAKE_STRV("ip=192.0.2.2:::::eth0", "ip=[2001:db8::2]:::56::eth0");
|
||||
NMConnection * connection;
|
||||
const char *const * ARGV =
|
||||
NM_MAKE_STRV("ip=192.0.2.2/16:::::eth0", "ip=[2001:db8::2]:::56::eth0");
|
||||
NMConnection * connection;
|
||||
NMSettingConnection *s_con;
|
||||
NMSettingWired * s_wired;
|
||||
NMSettingIPConfig * s_ip4;
|
||||
|
|
@ -437,6 +438,7 @@ test_multiple_merge(void)
|
|||
ip_addr = nm_setting_ip_config_get_address(s_ip4, 0);
|
||||
g_assert(ip_addr);
|
||||
g_assert_cmpstr(nm_ip_address_get_address(ip_addr), ==, "192.0.2.2");
|
||||
g_assert_cmpint(nm_ip_address_get_prefix(ip_addr), ==, 16);
|
||||
|
||||
s_ip6 = nm_connection_get_setting_ip6_config(connection);
|
||||
g_assert(s_ip6);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue