diff options
| author | Michael Biebl <biebl@debian.org> | 2017-11-07 00:15:27 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-11-07 00:15:27 +0100 |
| commit | 8254edbf64d60bef0d70eee01490103148dba100 (patch) | |
| tree | 282eb053995da653ee170e910da05d9530d4ff53 /src/tests/test-general.c | |
| parent | 857e5310d1764114da056cd2eb3d88625bb0ba81 (diff) | |
| parent | 90e8691111889a7b5f3c812f5a41f15a8a058913 (diff) | |
Update upstream source from tag 'upstream/1.9.90'
Update to upstream version '1.9.90' with Debian dir 83533c23245795edf9fe4919e4af3e78f2938519
Diffstat (limited to 'src/tests/test-general.c')
| -rw-r--r-- | src/tests/test-general.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/test-general.c b/src/tests/test-general.c index 37bbc5ca..d36a26ef 100644 --- a/src/tests/test-general.c +++ b/src/tests/test-general.c @@ -272,6 +272,32 @@ test_nm_utils_log_connection_diff (void) /*****************************************************************************/ +static void +do_test_sysctl_ip_conf (int addr_family, + const char *iface, + const char *property) +{ + char path[NM_UTILS_SYSCTL_IP_CONF_PATH_BUFSIZE]; + const char *pp; + + pp = nm_utils_sysctl_ip_conf_path (addr_family, path, iface, property); + g_assert (pp == path); + g_assert (path[0] == '/'); + + g_assert (nm_utils_sysctl_ip_conf_is_path (addr_family, path, iface, property)); + g_assert (nm_utils_sysctl_ip_conf_is_path (addr_family, path, NULL, property)); +} + +static void +test_nm_utils_sysctl_ip_conf_path (void) +{ + do_test_sysctl_ip_conf (AF_INET6, "a", "mtu"); + do_test_sysctl_ip_conf (AF_INET6, "eth0", "mtu"); + do_test_sysctl_ip_conf (AF_INET6, "e23456789012345", "mtu"); +} + +/*****************************************************************************/ + static NMConnection * _match_connection_new (void) { @@ -1716,6 +1742,8 @@ main (int argc, char **argv) g_test_add_func ("/general/nm_utils_ip6_address_same_prefix", test_nm_utils_ip6_address_same_prefix); g_test_add_func ("/general/nm_utils_log_connection_diff", test_nm_utils_log_connection_diff); + g_test_add_func ("/general/nm_utils_sysctl_ip_conf_path", test_nm_utils_sysctl_ip_conf_path); + g_test_add_func ("/general/exp10", test_nm_utils_exp10); g_test_add_func ("/general/connection-match/basic", test_connection_match_basic); |