diff options
author | Dan HorĂ¡k <dan@danny.cz> | 2019-09-21 17:31:48 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-09-27 09:17:57 +0200 |
commit | df07539105c2ad1e43f0f7c59adb68e213a78232 (patch) | |
tree | 9ad7838797dd5e0eaa9b495fd0a0bf977eac6469 | |
parent | 11d4412ee1554358c629f44eb41b5e8cc3546870 (diff) | |
download | NetworkManager-df07539105c2ad1e43f0f7c59adb68e213a78232.tar.gz |
nm-initrd-generator - add test for rd.znet
-rw-r--r-- | src/initrd/tests/test-cmdline-reader.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/initrd/tests/test-cmdline-reader.c b/src/initrd/tests/test-cmdline-reader.c index 84f01b8a5f..e06c299968 100644 --- a/src/initrd/tests/test-cmdline-reader.c +++ b/src/initrd/tests/test-cmdline-reader.c @@ -789,6 +789,18 @@ test_ignore_extra (void) g_assert_cmpint (g_hash_table_size (connections), ==, 0); } +static void +test_rd_znet (void) +{ + gs_unref_hashtable GHashTable *connections = NULL; + gs_strfreev char **argv = g_strdupv ((char *[]){ "ip=10.11.12.13::10.11.12.1:24:foo.example.com:enc800:none", + "rd.znet=ctc,0.0.0800,0.0.0801,layer2=0,portno=0", NULL }); + + connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", argv); + g_assert (connections); + g_assert_cmpint (g_hash_table_size (connections), ==, 1); +} + NMTST_DEFINE (); int main (int argc, char **argv) @@ -811,6 +823,7 @@ int main (int argc, char **argv) g_test_add_func ("/initrd/cmdline/bridge/default", test_bridge_default); g_test_add_func ("/initrd/cmdline/ibft", test_ibft); g_test_add_func ("/initrd/cmdline/ignore_extra", test_ignore_extra); + g_test_add_func ("/initrd/cmdline/rd_zdnet", test_rd_znet); return g_test_run (); } |