diff options
author | Dan Winship <danw@redhat.com> | 2014-12-16 10:33:16 -0500 |
---|---|---|
committer | Dan Winship <danw@redhat.com> | 2014-12-17 10:20:39 -0500 |
commit | 79cd7233fdda74196f532b20c79bf9ee3ae9d4c8 (patch) | |
tree | f60349cddf88923a04072f538f89c3f0cf3510d7 | |
parent | b4e8ee46c4f1f93f1dc4ac1b2c8ed590ba9d7d65 (diff) | |
download | NetworkManager-danw/ifcfg-rh-cleanup-bgo741659.tar.gz |
ifcfg-rh/tests: drop out_*file args from connection_from_file_test()danw/ifcfg-rh-cleanup-bgo741659
The out_keyfile, out_routefile, and out_route6file args were just
based on trivial calls to utils.h functions, and could just as easily
be done by the caller directly. So do that.
-rw-r--r-- | src/settings/plugins/ifcfg-rh/reader.c | 23 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/reader.h | 3 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 317 |
3 files changed, 71 insertions, 272 deletions
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c index 171fb13398..478d1b24eb 100644 --- a/src/settings/plugins/ifcfg-rh/reader.c +++ b/src/settings/plugins/ifcfg-rh/reader.c @@ -4629,9 +4629,6 @@ connection_from_file_full (const char *filename, const char *network_file, /* for unit tests only */ const char *test_type, /* for unit tests only */ char **out_unhandled, - char **out_keyfile, - char **out_routefile, - char **out_route6file, GError **error, gboolean *out_ignore_error) { @@ -4644,12 +4641,6 @@ connection_from_file_full (const char *filename, g_return_val_if_fail (filename != NULL, NULL); if (out_unhandled) g_return_val_if_fail (*out_unhandled == NULL, NULL); - if (out_keyfile) - g_return_val_if_fail (*out_keyfile == NULL, NULL); - if (out_routefile) - g_return_val_if_fail (*out_routefile == NULL, NULL); - if (out_route6file) - g_return_val_if_fail (*out_route6file == NULL, NULL); /* Non-NULL only for unit tests; normally use /etc/sysconfig/network */ if (!network_file) @@ -4827,13 +4818,6 @@ connection_from_file_full (const char *filename, connection = NULL; } - if (out_keyfile) - *out_keyfile = utils_get_keys_path (filename); - if (out_routefile) - *out_routefile = utils_get_route_path (filename); - if (out_route6file) - *out_route6file = utils_get_route6_path (filename); - done: svCloseFile (parsed); return connection; @@ -4849,7 +4833,6 @@ connection_from_file (const char *filename, conn = connection_from_file_full (filename, NULL, NULL, out_unhandled, - NULL, NULL, NULL, error, &ignore_error); if (error && *error && !ignore_error) @@ -4862,18 +4845,12 @@ connection_from_file_test (const char *filename, const char *network_file, const char *test_type, char **out_unhandled, - char **out_keyfile, - char **out_routefile, - char **out_route6file, GError **error) { return connection_from_file_full (filename, network_file, test_type, out_unhandled, - out_keyfile, - out_routefile, - out_route6file, error, NULL); } diff --git a/src/settings/plugins/ifcfg-rh/reader.h b/src/settings/plugins/ifcfg-rh/reader.h index 15d5bac36e..6a6af167ff 100644 --- a/src/settings/plugins/ifcfg-rh/reader.h +++ b/src/settings/plugins/ifcfg-rh/reader.h @@ -37,9 +37,6 @@ NMConnection *connection_from_file_test (const char *filename, const char *network_file, const char *test_type, char **out_unhandled, - char **out_keyfile, - char **out_routefile, - char **out_route6file, GError **error); #endif /* __READER_H__ */ diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 14d01d6e5c..bf3b8952cd 100644 --- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -195,7 +195,7 @@ test_read_basic (void) gboolean success; connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-minimal", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -255,7 +255,7 @@ test_read_miscellaneous_variables (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*invalid MAC in HWADDR_BLACKLIST 'XX:aa:invalid'*"); connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-misc-variables", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_no_error (error); g_assert (connection); @@ -305,7 +305,7 @@ test_read_variables_corner_cases (void) gboolean success; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-variables-corner-cases-1", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -353,7 +353,7 @@ test_read_unmanaged (void) connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-nm-controlled", NULL, TYPE_ETHERNET, &unhandled_spec, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -386,7 +386,7 @@ test_read_unmanaged_unrecognized (void) connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-nm-controlled-unrecognized", NULL, NULL, &unhandled_spec, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -417,7 +417,7 @@ test_read_unrecognized (void) connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-unrecognized", NULL, NULL, &unhandled_spec, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -453,7 +453,7 @@ test_read_wired_static (const char *file, gboolean success; connection = connection_from_file_test (file, NULL, TYPE_ETHERNET, - &unmanaged, NULL, NULL, NULL, &error); + &unmanaged, &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -547,7 +547,7 @@ test_read_wired_static_no_prefix (gconstpointer user_data) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*missing PREFIX, assuming*"); connection = connection_from_file_test (file, NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_test_assert_expected_messages (); g_assert_no_error (error); g_assert (connection); @@ -594,7 +594,6 @@ test_read_wired_dhcp (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-dhcp-read", "failed to read %s: %s", TEST_IFCFG_WIRED_DHCP, error->message); @@ -730,7 +729,7 @@ test_read_wired_dhcp_plus_ip (void) connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp-plus-ip", NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -807,7 +806,7 @@ test_read_wired_global_gateway (void) connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-global-gateway", TEST_IFCFG_DIR"/network-scripts/network-test-wired-global-gateway", - TYPE_ETHERNET, &unmanaged, NULL, NULL, NULL, &error); + TYPE_ETHERNET, &unmanaged, &error); nmtst_assert_connection_verifies_without_normalization (connection); g_assert (unmanaged == NULL); @@ -847,7 +846,7 @@ test_read_wired_never_default (void) connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-never-default", TEST_IFCFG_DIR"/network-scripts/network-test-wired-never-default", - TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + TYPE_ETHERNET, NULL, &error); nmtst_assert_connection_verifies_without_normalization (connection); /* ===== WIRED SETTING ===== */ @@ -888,7 +887,6 @@ test_read_wired_defroute_no (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-defroute-no-read", "failed to read %s: %s", TEST_IFCFG_WIRED_DEFROUTE_NO, error->message); @@ -995,7 +993,6 @@ test_read_wired_defroute_no_gatewaydev_yes (void) TEST_NETWORK_WIRED_DEFROUTE_NO_GATEWAYDEV_YES, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-defroute-no-gatewaydev-yes-read", @@ -1101,7 +1098,7 @@ test_read_wired_static_routes (void) NMIPRoute *ip4_route; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static-routes", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); nmtst_assert_connection_verifies_without_normalization (connection); /* ===== CONNECTION SETTING ===== */ @@ -1157,7 +1154,6 @@ test_read_wired_static_routes_legacy (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, @@ -1269,7 +1265,6 @@ test_read_wired_ipv4_manual (const char *file, const char *expected_id) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-ipv4-manual-read", "failed to read %s: %s", file, error->message); @@ -1376,7 +1371,6 @@ test_read_wired_ipv6_manual (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); g_test_assert_expected_messages (); @@ -1596,7 +1590,6 @@ test_read_wired_ipv6_only (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-ipv6-only-read", "failed to read %s: %s", TEST_IFCFG_WIRED_IPV6_ONLY, error->message); @@ -1722,7 +1715,6 @@ test_read_wired_dhcp6_only (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-dhcp6-only-read", "failed to read %s: %s", TEST_IFCFG_WIRED_DHCP6_ONLY, error->message); @@ -1810,7 +1802,6 @@ test_read_onboot_no (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "onboot-no-read", "failed to read %s: %s", TEST_IFCFG_ONBOOT_NO, error->message); @@ -1853,7 +1844,6 @@ test_read_noip (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_assert (connection); g_assert (nm_connection_verify (connection, &error)); @@ -1897,7 +1887,6 @@ test_read_wired_8021x_peap_mschapv2 (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-8021x-peap-mschapv2-read", "failed to read %s: %s", TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2, error->message); @@ -2078,7 +2067,6 @@ test_read_wired_8021x_tls_secret_flags (const char *ifcfg, NMSettingSecretFlags NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -2127,7 +2115,7 @@ test_read_write_802_1X_subj_matches (void) "*missing IEEE_8021X_CA_CERT*peap*"); connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-802-1X-subj-matches", NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_test_assert_expected_messages (); g_assert_no_error (error); g_assert (connection != NULL); @@ -2161,7 +2149,7 @@ test_read_write_802_1X_subj_matches (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*missing IEEE_8021X_CA_CERT*peap*"); reread = connection_from_file_test (written, NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_test_assert_expected_messages (); unlink (written); g_free (written); @@ -2209,7 +2197,7 @@ test_read_802_1x_ttls_eapgtc (void) */ connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-802-1x-ttls-eapgtc", - NULL, TYPE_WIRELESS, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_WIRELESS, NULL, &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -2252,7 +2240,6 @@ test_read_wired_aliases_good (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "aliases-good-read", "failed to read %s: %s", TEST_IFCFG_ALIASES_GOOD, error->message); @@ -2359,7 +2346,6 @@ test_read_wired_aliases_bad (const char *base, const char *expected_id) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_test_assert_expected_messages (); ASSERT (connection != NULL, @@ -2469,7 +2455,6 @@ test_read_wifi_open (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-open-read", "failed to read %s: %s", TEST_IFCFG_WIFI_OPEN, error->message); @@ -2627,7 +2612,6 @@ test_read_wifi_open_auto (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-open-auto-read", "failed to read %s: %s", TEST_IFCFG_WIFI_OPEN_AUTO, error->message); @@ -2697,7 +2681,6 @@ test_read_wifi_open_ssid_hex (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-open-ssid-hex-read", "failed to read %s: %s", TEST_IFCFG_WIFI_OPEN_SSID_HEX, error->message); @@ -2765,7 +2748,6 @@ test_read_wifi_open_ssid_bad (const char *file, const char *test) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection == NULL, test, "unexpected success reading %s", file); g_clear_error (&error); @@ -2790,7 +2772,6 @@ test_read_wifi_open_ssid_quoted (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-open-ssid-quoted-read", "failed to read %s: %s", TEST_IFCFG_WIFI_OPEN_SSID_QUOTED, error->message); @@ -2875,7 +2856,6 @@ test_read_wifi_wep (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wep-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WEP, error->message); @@ -3116,7 +3096,6 @@ test_read_wifi_wep_adhoc (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wep-adhoc-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WEP_ADHOC, error->message); @@ -3340,7 +3319,6 @@ test_read_wifi_wep_passphrase (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wep-passphrase-read", "failed to read %s: %s", @@ -3453,7 +3431,6 @@ test_read_wifi_wep_40_ascii (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wep-40-ascii-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WEP_40_ASCII, error->message); @@ -3564,7 +3541,6 @@ test_read_wifi_wep_104_ascii (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wep-104-ascii-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WEP_104_ASCII, error->message); @@ -3676,7 +3652,6 @@ test_read_wifi_leap (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-leap-read", "failed to read %s: %s", TEST_IFCFG_WIFI_LEAP, error->message); @@ -3787,7 +3762,6 @@ test_read_wifi_leap_secret_flags (const char *file, NMSettingSecretFlags expecte NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -3850,7 +3824,6 @@ test_read_wifi_wpa_psk (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wpa-psk-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_PSK, error->message); @@ -4121,7 +4094,6 @@ test_read_wifi_wpa_psk_2 (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wpa-psk-2-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_PSK_2, error->message); @@ -4200,7 +4172,6 @@ test_read_wifi_wpa_psk_unquoted (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wpa-psk-unquoted-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED, error->message); @@ -4277,7 +4248,6 @@ test_read_wifi_wpa_psk_unquoted2 (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection == NULL, "wifi-wpa-psk-unquoted-read", "unexpected success reading %s", TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED2); @@ -4308,7 +4278,6 @@ test_read_wifi_wpa_psk_adhoc (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wpa-psk-adhoc-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_PSK_ADHOC, error->message); @@ -4473,7 +4442,6 @@ test_read_wifi_wpa_psk_hex (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wpa-psk-hex-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_PSK_HEX, error->message); @@ -4603,7 +4571,6 @@ test_read_wifi_wpa_eap_tls (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wpa-eap-tls-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_EAP_TLS, error->message); @@ -4732,7 +4699,6 @@ test_read_wifi_wpa_eap_ttls_tls (void) NULL, TYPE_WIRELESS, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wpa-eap-ttls-tls-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_EAP_TTLS_TLS, error->message); @@ -4875,7 +4841,6 @@ test_read_wifi_dynamic_wep_leap (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -4942,7 +4907,6 @@ test_read_wifi_wep_eap_ttls_chap (void) NULL, TYPE_WIRELESS, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wep-eap-ttls-chap-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WEP_EAP_TTLS_CHAP, error->message); @@ -5080,7 +5044,7 @@ test_read_wifi_hidden (void) GError *error = NULL; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-hidden", - NULL, TYPE_WIRELESS, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_WIRELESS, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -5168,7 +5132,7 @@ test_write_wifi_hidden (void) /* re-read the connection for comparison */ reread = connection_from_file_test (testfile, NULL, TYPE_WIRELESS, - NULL, NULL, NULL, NULL, &error); + NULL, &error); unlink (testfile); g_assert_no_error (error); g_assert (reread); @@ -5194,7 +5158,7 @@ test_read_wifi_band_a (void) GError *error = NULL; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-band-a", - NULL, TYPE_WIRELESS, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_WIRELESS, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -5282,7 +5246,7 @@ test_write_wifi_band_a (void) /* re-read the connection for comparison */ reread = connection_from_file_test (testfile, NULL, TYPE_WIRELESS, - NULL, NULL, NULL, NULL, &error); + NULL, &error); unlink (testfile); g_assert_no_error (error); g_assert (reread); @@ -5305,7 +5269,7 @@ test_read_wifi_band_a_channel_mismatch (void) GError *error = NULL; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-band-a-channel-mismatch", - NULL, TYPE_WIRELESS, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_WIRELESS, NULL, &error); g_assert (connection == NULL); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); } @@ -5317,7 +5281,7 @@ test_read_wifi_band_bg_channel_mismatch (void) GError *error = NULL; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-band-bg-channel-mismatch", - NULL, TYPE_WIRELESS, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_WIRELESS, NULL, &error); g_assert (connection == NULL); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); } @@ -5345,7 +5309,6 @@ test_read_wired_qeth_static (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wired-qeth-static-read", "failed to read %s: %s", TEST_IFCFG_WIRED_QETH_STATIC, error->message); @@ -5502,7 +5465,6 @@ test_read_wired_ctc_static (void) NULL, TYPE_ETHERNET, &unmanaged, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -5560,7 +5522,6 @@ test_read_wifi_wep_no_keys (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "wifi-wep-no-keys-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WEP_NO_KEYS, error->message); @@ -5658,7 +5619,6 @@ test_read_permissions (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "permissions-read", "failed to read %s: %s", TEST_IFCFG_PERMISSIONS, error->message); @@ -5721,7 +5681,6 @@ test_read_wifi_wep_agent_keys (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); g_assert (connection != NULL); @@ -5904,9 +5863,6 @@ test_write_wired_static (void) NULL, TYPE_ETHERNET, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -6014,7 +5970,6 @@ test_write_wired_dhcp (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); unlink (testfile); @@ -6042,7 +5997,7 @@ test_write_wired_dhcp_plus_ip (void) connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp-plus-ip", NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection != NULL); @@ -6057,7 +6012,7 @@ test_write_wired_dhcp_plus_ip (void) /* re-read the connection for comparison */ reread = connection_from_file_test (written, NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); unlink (written); g_free (written); @@ -6088,7 +6043,7 @@ test_read_write_wired_dhcp_send_hostname (void) connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp-send-hostname", NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection != NULL); @@ -6117,7 +6072,7 @@ test_read_write_wired_dhcp_send_hostname (void) /* re-read the connection for comparison */ reread = connection_from_file_test (written, NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); unlink (written); g_free (written); @@ -6232,9 +6187,6 @@ test_write_wired_static_ip6_only (void) NULL, TYPE_ETHERNET, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -6348,8 +6300,7 @@ test_write_wired_static_ip6_only_gw (gconstpointer user_data) reread = connection_from_file_test (testfile, NULL, TYPE_ETHERNET, - NULL, NULL, - NULL, NULL, + NULL, &error); g_assert_no_error (error); g_assert (reread); @@ -6410,7 +6361,6 @@ test_read_write_static_routes_legacy (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "read-write-static-routes-legacy-read", "failed to read %s: %s", @@ -6496,12 +6446,11 @@ test_read_write_static_routes_legacy (void) NULL, TYPE_ETHERNET, NULL, - NULL, - &routefile2, - &route6file2, &error); unlink (testfile); + routefile2 = utils_get_route_path (testfile); unlink (routefile2); + route6file2 = utils_get_route6_path (testfile); unlink (route6file2); ASSERT (reread != NULL, @@ -6639,17 +6588,13 @@ test_write_wired_static_routes (void) NULL, TYPE_ETHERNET, NULL, - NULL, - &routefile, - NULL, &error); unlink (testfile); ASSERT (reread != NULL, "wired-static-routes-write-reread", "failed to read %s: %s", testfile, error->message); - ASSERT (routefile != NULL, - "wired-static-routes-write-reread", "expected routefile for '%s'", testfile); + routefile = utils_get_route_path (testfile); unlink (routefile); ASSERT (nm_connection_verify (reread, &error), @@ -6762,17 +6707,13 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void) NULL, TYPE_ETHERNET, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); ASSERT (reread != NULL, "wired-dhcp-8021x-peap-mschapv2write-reread", "failed to read %s: %s", testfile, error->message); - ASSERT (keyfile != NULL, - "wired-dhcp-8021x-peap-mschapv2write-reread", "expected keyfile for '%s'", testfile); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); ASSERT (nm_connection_verify (reread, &error), @@ -6938,12 +6879,9 @@ test_write_wired_8021x_tls (NMSetting8021xCKScheme scheme, NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - g_assert (keyfile != NULL); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); g_assert (reread != NULL); @@ -7129,7 +7067,6 @@ test_write_wired_aliases (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); unlink (testfile); unlink (TEST_SCRATCH_ALIAS_BASE ":2"); @@ -7302,7 +7239,7 @@ test_write_gateway (void) /* re-read the connection for comparison */ reread = connection_from_file_test (testfile, NULL, TYPE_WIRELESS, - NULL, NULL, NULL, NULL, &error); + NULL, &error); unlink (testfile); g_assert_no_error (error); g_assert (reread); @@ -7412,7 +7349,6 @@ test_write_wifi_open (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); @@ -7530,7 +7466,6 @@ test_write_wifi_open_hex_ssid (void) NULL, TYPE_WIRELESS, NULL, - NULL, NULL, NULL, &error); unlink (testfile); @@ -7648,22 +7583,16 @@ test_write_wifi_wep (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-wep-write-reread", "expected keyfile for '%s'", testfile); - + keyfile = utils_get_keys_path (testfile); ASSERT (stat (keyfile, &statbuf) == 0, "wifi-wep-write-reread", "couldn't stat() '%s'", keyfile); ASSERT (S_ISREG (statbuf.st_mode), "wifi-wep-write-reread", "keyfile '%s' wasn't a normal file", keyfile); ASSERT ((statbuf.st_mode & 0077) == 0, "wifi-wep-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); - unlink (keyfile); ASSERT (reread != NULL, @@ -7787,22 +7716,16 @@ test_write_wifi_wep_adhoc (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-wep-adhoc-write-reread", "expected keyfile for '%s'", testfile); - + keyfile = utils_get_keys_path (testfile); ASSERT (stat (keyfile, &statbuf) == 0, "wifi-wep-adhoc-write-reread", "couldn't stat() '%s'", keyfile); ASSERT (S_ISREG (statbuf.st_mode), "wifi-wep-adhoc-write-reread", "keyfile '%s' wasn't a normal file", keyfile); ASSERT ((statbuf.st_mode & 0077) == 0, "wifi-wep-adhoc-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); - unlink (keyfile); ASSERT (reread != NULL, @@ -7918,22 +7841,16 @@ test_write_wifi_wep_passphrase (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-wep-passphrase-write-reread", "expected keyfile for '%s'", testfile); - + keyfile = utils_get_keys_path (testfile); ASSERT (stat (keyfile, &statbuf) == 0, "wifi-wep-passphrase-write-reread", "couldn't stat() '%s'", keyfile); ASSERT (S_ISREG (statbuf.st_mode), "wifi-wep-passphrase-write-reread", "keyfile '%s' wasn't a normal file", keyfile); ASSERT ((statbuf.st_mode & 0077) == 0, "wifi-wep-passphrase-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); - unlink (keyfile); ASSERT (reread != NULL, @@ -8051,22 +7968,16 @@ test_write_wifi_wep_40_ascii (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-wep-40-ascii-write-reread", "expected keyfile for '%s'", testfile); - + keyfile = utils_get_keys_path (testfile); ASSERT (stat (keyfile, &statbuf) == 0, "wifi-wep-40-ascii-write-reread", "couldn't stat() '%s'", keyfile); ASSERT (S_ISREG (statbuf.st_mode), "wifi-wep-40-ascii-write-reread", "keyfile '%s' wasn't a normal file", keyfile); ASSERT ((statbuf.st_mode & 0077) == 0, "wifi-wep-40-ascii-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); - unlink (keyfile); ASSERT (reread != NULL, @@ -8184,22 +8095,16 @@ test_write_wifi_wep_104_ascii (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-wep-104-ascii-write-reread", "expected keyfile for '%s'", testfile); - + keyfile = utils_get_keys_path (testfile); ASSERT (stat (keyfile, &statbuf) == 0, "wifi-wep-104-ascii-write-reread", "couldn't stat() '%s'", keyfile); ASSERT (S_ISREG (statbuf.st_mode), "wifi-wep-104-ascii-write-reread", "keyfile '%s' wasn't a normal file", keyfile); ASSERT ((statbuf.st_mode & 0077) == 0, "wifi-wep-104-ascii-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); - unlink (keyfile); ASSERT (reread != NULL, @@ -8314,22 +8219,16 @@ test_write_wifi_leap (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-leap-write-reread", "expected keyfile for '%s'", testfile); - + keyfile = utils_get_keys_path (testfile); ASSERT (stat (keyfile, &statbuf) == 0, "wifi-leap-write-reread", "couldn't stat() '%s'", keyfile); ASSERT (S_ISREG (statbuf.st_mode), "wifi-leap-write-reread", "keyfile '%s' wasn't a normal file", keyfile); ASSERT ((statbuf.st_mode & 0077) == 0, "wifi-leap-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); - unlink (keyfile); ASSERT (reread != NULL, @@ -8443,16 +8342,13 @@ test_write_wifi_leap_secret_flags (NMSettingSecretFlags flags) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); g_assert_no_error (error); /* No key should be written out since the secret is not system owned */ - g_assert (keyfile); + keyfile = utils_get_keys_path (testfile); g_assert (g_file_test (keyfile, G_FILE_TEST_EXISTS) == FALSE); g_assert (reread); @@ -8589,17 +8485,13 @@ test_write_wifi_wpa_psk (const char *name, NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - tmp = g_strdup_printf ("%s-reread", test_name); - ASSERT (keyfile != NULL, - tmp, "expected keyfile for '%s'", testfile); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); + tmp = g_strdup_printf ("%s-reread", test_name); ASSERT (reread != NULL, tmp, "failed to read %s: %s", testfile, error->message); @@ -8728,14 +8620,10 @@ test_write_wifi_wpa_psk_adhoc (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-wpa-psk-adhoc-write-reread", "expected keyfile for '%s'", testfile); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); ASSERT (reread != NULL, @@ -8884,14 +8772,10 @@ test_write_wifi_wpa_eap_tls (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); - ASSERT (keyfile != NULL, - "wifi-wpa-eap-tls-write-reread", "expected keyfile for '%s'", testfile); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); ASSERT (reread != NULL, @@ -9058,17 +8942,13 @@ test_write_wifi_wpa_eap_ttls_tls (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); ASSERT (reread != NULL, "wifi-wpa-eap-ttls-tls-write-reread", "failed to read %s: %s", testfile, error->message); - ASSERT (keyfile != NULL, - "wifi-wpa-eap-ttls-tls-write-reread", "expected keyfile for '%s'", testfile); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); ASSERT (nm_connection_verify (reread, &error), @@ -9204,17 +9084,13 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); ASSERT (reread != NULL, "wifi-wpa-eap-ttls-mschapv2-write-reread", "failed to read %s: %s", testfile, error->message); - ASSERT (keyfile != NULL, - "wifi-wpa-eap-ttls-mschapv2-write-reread", "expected keyfile for '%s'", testfile); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); ASSERT (nm_connection_verify (reread, &error), @@ -9338,9 +9214,6 @@ test_write_wifi_wpa_then_open (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); g_assert_no_error (error); g_assert (reread); @@ -9357,6 +9230,7 @@ test_write_wifi_wpa_then_open (void) nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY); /* Write it back out */ + keyfile = utils_get_keys_path (testfile); success = writer_update_connection (connection, TEST_SCRATCH_DIR "/network-scripts/", testfile, @@ -9377,9 +9251,6 @@ test_write_wifi_wpa_then_open (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); unlink (testfile); g_assert_no_error (error); @@ -9387,7 +9258,7 @@ test_write_wifi_wpa_then_open (void) g_assert (reread); /* No keyfile since it's an open connection this time */ - g_assert (keyfile); + keyfile = utils_get_keys_path (testfile); g_assert (g_file_test (keyfile, G_FILE_TEST_EXISTS) == FALSE); success = nm_connection_verify (reread, &error); @@ -9519,9 +9390,6 @@ test_write_wifi_wpa_then_wep_with_perms (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); g_assert_no_error (error); g_assert (reread); @@ -9545,6 +9413,7 @@ test_write_wifi_wpa_then_wep_with_perms (void) nm_setting_wireless_security_set_wep_key (s_wsec, 0, "abraka dabra"); /* Write it back out */ + keyfile = utils_get_keys_path (testfile); success = writer_update_connection (connection, TEST_SCRATCH_DIR "/network-scripts/", testfile, @@ -9564,9 +9433,6 @@ test_write_wifi_wpa_then_wep_with_perms (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); g_assert_no_error (error); @@ -9582,6 +9448,7 @@ test_write_wifi_wpa_then_wep_with_perms (void) ASSERT (success, "test_write_wifi_wpa_then_wep_with_perms", "failed to compare connections"); + keyfile = utils_get_keys_path (testfile); unlink (keyfile); unlink (testfile); @@ -9698,13 +9565,11 @@ test_write_wifi_dynamic_wep_leap (void) NULL, TYPE_WIRELESS, NULL, - &keyfile, - NULL, - NULL, &error); g_assert_no_error (error); g_assert (reread); - g_assert (keyfile); + + keyfile = utils_get_keys_path (testfile); unlink (keyfile); success = nm_connection_verify (reread, &error); @@ -9827,9 +9692,6 @@ test_write_wired_qeth_dhcp (void) NULL, TYPE_ETHERNET, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -9950,9 +9812,6 @@ test_write_wired_ctc_dhcp (void) NULL, TYPE_ETHERNET, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -10050,9 +9909,6 @@ test_write_permissions (void) NULL, TYPE_ETHERNET, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -10167,9 +10023,6 @@ test_write_wifi_wep_agent_keys (void) NULL, TYPE_WIRELESS, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -10429,7 +10282,6 @@ test_read_bridge_main (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_assert (connection); g_assert (nm_connection_verify (connection, &error)); @@ -10542,7 +10394,6 @@ test_write_bridge_main (void) NULL, TYPE_BRIDGE, NULL, - NULL, NULL, NULL, &error); unlink (testfile); @@ -10571,7 +10422,6 @@ test_read_bridge_component (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_assert (connection); @@ -10667,9 +10517,6 @@ test_write_bridge_component (void) NULL, TYPE_ETHERNET, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -10697,7 +10544,6 @@ test_read_bridge_missing_stp (void) NULL, TYPE_BRIDGE, NULL, - NULL, NULL, NULL, &error); g_assert (connection); g_assert (nm_connection_verify (connection, &error)); @@ -10728,7 +10574,6 @@ test_read_vlan_interface (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection != NULL); @@ -10786,7 +10631,6 @@ test_read_vlan_only_vlan_id (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection != NULL); @@ -10816,7 +10660,6 @@ test_read_vlan_only_device (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection != NULL); @@ -10842,7 +10685,7 @@ test_read_vlan_physdev (void) connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-physdev", NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection); g_assert (nm_connection_verify (connection, &error)); @@ -10870,7 +10713,6 @@ test_write_vlan (void) NULL, TYPE_VLAN, NULL, - NULL, NULL, NULL, &error); g_assert (connection != NULL); @@ -10897,7 +10739,6 @@ test_write_vlan_only_vlanid (void) NULL, TYPE_VLAN, NULL, - NULL, NULL, NULL, &error); g_assert_no_error (error); g_assert (connection != NULL); @@ -10916,7 +10757,6 @@ test_write_vlan_only_vlanid (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); unlink (written); g_free (written); @@ -11012,7 +10852,6 @@ test_write_ethernet_missing_ipv6 (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); unlink (testfile); @@ -11051,7 +10890,7 @@ test_read_ibft_ignored (void) connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-ibft", NULL, TYPE_ETHERNET, - NULL, NULL, NULL, NULL, &error); + NULL, &error); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); g_assert (connection == NULL); } @@ -11069,7 +10908,6 @@ test_read_bond_main (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "bond-main-read", "unexpected failure reading %s", TEST_IFCFG_BOND_MAIN); @@ -11181,7 +11019,6 @@ test_write_bond_main (void) NULL, TYPE_BOND, NULL, - NULL, NULL, NULL, &error); unlink (testfile); @@ -11212,7 +11049,6 @@ test_read_bond_slave (void) NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); g_test_assert_expected_messages (); @@ -11303,9 +11139,6 @@ test_write_bond_slave (void) NULL, TYPE_ETHERNET, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -11341,7 +11174,6 @@ test_read_infiniband (void) NULL, TYPE_INFINIBAND, &unmanaged, - NULL, NULL, NULL, &error); ASSERT (connection != NULL, "infiniband-read", "failed to read %s: %s", TEST_IFCFG_INFINIBAND, error->message); @@ -11478,7 +11310,6 @@ test_write_infiniband (void) NULL, TYPE_INFINIBAND, NULL, - NULL, NULL, NULL, &error); unlink (testfile); @@ -11509,7 +11340,6 @@ test_read_bond_slave_ib (void) NULL, NULL, NULL, - NULL, NULL, NULL, &error); g_test_assert_expected_messages(); @@ -11600,9 +11430,6 @@ test_write_bond_slave_ib (void) NULL, NULL, NULL, - NULL, - NULL, - &route6file, &error); unlink (testfile); @@ -11641,7 +11468,7 @@ test_read_dcb_basic (void) gboolean expected_pfcs[8] = { TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE }; connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -11774,8 +11601,7 @@ test_write_dcb_basic (void) reread = connection_from_file_test (testfile, NULL, TYPE_ETHERNET, - NULL, NULL, - NULL, NULL, + NULL, &error); unlink (testfile); @@ -11798,7 +11624,7 @@ test_read_dcb_default_app_priorities (void) gboolean success; connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-default-app-priorities", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_assert_no_error (error); g_assert (connection); success = nm_connection_verify (connection, &error); @@ -11829,7 +11655,7 @@ test_read_dcb_bad_booleans (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*invalid DCB_PG_STRICT value*not all 0s and 1s*"); connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-booleans", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); @@ -11846,7 +11672,7 @@ test_read_dcb_short_booleans (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*DCB_PG_STRICT value*8 characters*"); connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-booleans", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); @@ -11863,7 +11689,7 @@ test_read_dcb_bad_uints (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*invalid DCB_PG_UP2TC value*not 0 - 7*"); connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-uints", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); @@ -11880,7 +11706,7 @@ test_read_dcb_short_uints (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*DCB_PG_UP2TC value*8 characters*"); connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-uints", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); @@ -11897,7 +11723,7 @@ test_read_dcb_bad_percent (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*invalid DCB_PG_PCT percentage value*"); connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-percent", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); @@ -11914,7 +11740,7 @@ test_read_dcb_short_percent (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*invalid DCB_PG_PCT percentage list value*"); connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-percent", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); @@ -11931,7 +11757,7 @@ test_read_dcb_pgpct_not_100 (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*DCB_PG_PCT percentages do not equal 100*"); connection = connection_from_file_test (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-pgpct-not-100", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_test_assert_expected_messages (); g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION); @@ -11950,7 +11776,7 @@ test_read_fcoe_mode (gconstpointer user_data) char *file; file = g_strdup_printf (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-fcoe-%s", expected_mode); - connection = connection_from_file_test (file, NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + connection = connection_from_file_test (file, NULL, TYPE_ETHERNET, NULL, &error); g_free (file); g_assert_no_error (error); g_assert (connection); @@ -12043,8 +11869,7 @@ test_write_fcoe_mode (gconstpointer user_data) reread = connection_from_file_test (testfile, NULL, TYPE_ETHERNET, - NULL, NULL, - NULL, NULL, + NULL, &error); unlink (testfile); @@ -12069,7 +11894,7 @@ test_read_team_master (void) const char *expected_config = "{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }"; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -12181,7 +12006,7 @@ test_write_team_master (void) /* re-read the connection for comparison */ reread = connection_from_file_test (testfile, NULL, TYPE_ETHERNET, - NULL, NULL, NULL, NULL, &error); + NULL, &error); unlink (testfile); g_assert_no_error (error); g_assert (reread); @@ -12208,7 +12033,7 @@ test_read_team_port (void) const char *expected_config = "{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }"; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -12304,7 +12129,7 @@ test_write_team_port (void) /* re-read the connection for comparison */ reread = connection_from_file_test (testfile, NULL, TYPE_ETHERNET, - NULL, NULL, NULL, NULL, &error); + NULL, &error); unlink (testfile); g_assert_no_error (error); g_assert (reread); @@ -12329,7 +12154,7 @@ test_read_team_port_empty_config (void) GError *error = NULL; connection = connection_from_file_test (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-empty-config", - NULL, TYPE_ETHERNET, NULL, NULL, NULL, NULL, &error); + NULL, TYPE_ETHERNET, NULL, &error); g_assert_no_error (error); g_assert (connection); @@ -12475,7 +12300,7 @@ test_read_vlan_trailing_spaces (void) g_free (contents); connection = connection_from_file_test (testfile, NULL, TYPE_ETHERNET, NULL, - NULL, NULL, NULL, &error); + &error); g_assert_no_error (error); g_assert (connection != NULL); |