diff options
author | Thomas Haller <thaller@redhat.com> | 2016-03-10 13:57:45 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-03-10 14:04:32 +0100 |
commit | fd8c56425e9e94aff52b1e7f00ed17066390e425 (patch) | |
tree | 1db99128ef3e2f5f6551062554e17ec84fa891bd | |
parent | f6ea8f5e67f3b70888f9ef1e282cba7b8880f3b9 (diff) | |
download | NetworkManager-fd8c56425e9e94aff52b1e7f00ed17066390e425.tar.gz |
all/tests: fix tests after adjusting glib logging level
Fixes: b49322b568725c8c92c0732b14cc726748ec57d3
-rw-r--r-- | src/dhcp-manager/tests/test-dhcp-utils.c | 14 | ||||
-rw-r--r-- | src/platform/tests/test-link.c | 10 | ||||
-rw-r--r-- | src/settings/plugins/ibft/tests/test-ibft.c | 2 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 32 | ||||
-rw-r--r-- | src/settings/plugins/ifnet/tests/test-ifnet.c | 14 | ||||
-rw-r--r-- | src/settings/plugins/keyfile/tests/test-keyfile.c | 46 | ||||
-rw-r--r-- | src/supplicant-manager/tests/test-supplicant-config.c | 70 | ||||
-rw-r--r-- | src/tests/config/test-config.c | 16 | ||||
-rw-r--r-- | src/tests/test-general-with-expect.c | 8 |
9 files changed, 106 insertions, 106 deletions
diff --git a/src/dhcp-manager/tests/test-dhcp-utils.c b/src/dhcp-manager/tests/test-dhcp-utils.c index 3805132683..162f2dd4cd 100644 --- a/src/dhcp-manager/tests/test-dhcp-utils.c +++ b/src/dhcp-manager/tests/test-dhcp-utils.c @@ -331,7 +331,7 @@ test_dhclient_invalid_classless_routes_1 (void) options = fill_table (generic_options, NULL); options = fill_table (data, options); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring invalid classless static routes*"); ip4_config = nm_dhcp_utils_ip4_config_from_options (1, "eth0", options, 0); g_assert (ip4_config); @@ -362,7 +362,7 @@ test_dhcpcd_invalid_classless_routes_1 (void) options = fill_table (generic_options, NULL); options = fill_table (data, options); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring invalid classless static routes*"); ip4_config = nm_dhcp_utils_ip4_config_from_options (1, "eth0", options, 0); g_assert (ip4_config); @@ -395,7 +395,7 @@ test_dhclient_invalid_classless_routes_2 (void) options = fill_table (generic_options, NULL); options = fill_table (data, options); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring invalid classless static routes*"); ip4_config = nm_dhcp_utils_ip4_config_from_options (1, "eth0", options, 0); g_assert (ip4_config); @@ -428,7 +428,7 @@ test_dhcpcd_invalid_classless_routes_2 (void) options = fill_table (generic_options, NULL); options = fill_table (data, options); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring invalid classless static routes*"); ip4_config = nm_dhcp_utils_ip4_config_from_options (1, "eth0", options, 0); g_assert (ip4_config); @@ -461,7 +461,7 @@ test_dhclient_invalid_classless_routes_3 (void) options = fill_table (generic_options, NULL); options = fill_table (data, options); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring invalid classless static routes*"); ip4_config = nm_dhcp_utils_ip4_config_from_options (1, "eth0", options, 0); g_assert (ip4_config); @@ -489,7 +489,7 @@ test_dhcpcd_invalid_classless_routes_3 (void) options = fill_table (generic_options, NULL); options = fill_table (data, options); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*DHCP provided invalid classless static route*"); ip4_config = nm_dhcp_utils_ip4_config_from_options (1, "eth0", options, 0); g_assert (ip4_config); @@ -598,7 +598,7 @@ test_invalid_escaped_domain_searches (void) options = fill_table (generic_options, NULL); options = fill_table (data, options); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*invalid domain search*"); ip4_config = nm_dhcp_utils_ip4_config_from_options (1, "eth0", options, 0); g_assert (ip4_config); diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c index e175a170be..28af623a97 100644 --- a/src/platform/tests/test-link.c +++ b/src/platform/tests/test-link.c @@ -54,16 +54,16 @@ test_bogus(void) g_assert (!nm_platform_link_get_type (NM_PLATFORM_GET, BOGUS_IFINDEX)); g_assert (!nm_platform_link_get_type_name (NM_PLATFORM_GET, BOGUS_IFINDEX)); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*failure changing link: *"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*failure changing link: *"); g_assert (!nm_platform_link_set_up (NM_PLATFORM_GET, BOGUS_IFINDEX, NULL)); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*failure changing link: *"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*failure changing link: *"); g_assert (!nm_platform_link_set_down (NM_PLATFORM_GET, BOGUS_IFINDEX)); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*failure changing link: *"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*failure changing link: *"); g_assert (!nm_platform_link_set_arp (NM_PLATFORM_GET, BOGUS_IFINDEX)); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*failure changing link: *"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*failure changing link: *"); g_assert (!nm_platform_link_set_noarp (NM_PLATFORM_GET, BOGUS_IFINDEX)); g_assert (!nm_platform_link_is_up (NM_PLATFORM_GET, BOGUS_IFINDEX)); @@ -74,7 +74,7 @@ test_bogus(void) g_assert (!addrlen); g_assert (!nm_platform_link_get_address (NM_PLATFORM_GET, BOGUS_IFINDEX, NULL)); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*failure changing link: *"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*failure changing link: *"); g_assert (!nm_platform_link_set_mtu (NM_PLATFORM_GET, BOGUS_IFINDEX, MTU)); g_assert (!nm_platform_link_get_mtu (NM_PLATFORM_GET, BOGUS_IFINDEX)); diff --git a/src/settings/plugins/ibft/tests/test-ibft.c b/src/settings/plugins/ibft/tests/test-ibft.c index a9085478cd..9c98d8912c 100644 --- a/src/settings/plugins/ibft/tests/test-ibft.c +++ b/src/settings/plugins/ibft/tests/test-ibft.c @@ -181,7 +181,7 @@ test_read_ibft_malformed (gconstpointer user_data) g_assert (g_file_test (iscsiadm_path, G_FILE_TEST_EXISTS)); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*malformed iscsiadm record*"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*malformed iscsiadm record*"); success = read_ibft_blocks (iscsiadm_path, &blocks, &error); g_assert_no_error (error); 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 1856a3a62a..5ed25fda10 100644 --- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -310,7 +310,7 @@ test_read_miscellaneous_variables (void) int mac_blacklist_num, i; guint64 expected_timestamp = 0; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*invalid MAC in HWADDR_BLACKLIST 'XX:aa:invalid'*"); connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-misc-variables", NULL, TYPE_ETHERNET, NULL); @@ -563,7 +563,7 @@ test_read_wired_static_no_prefix (gconstpointer user_data) file = g_strdup_printf (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-static-no-prefix-%u", expected_prefix); expected_id = g_strdup_printf ("System test-wired-static-no-prefix-%u", expected_prefix); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*missing PREFIX, assuming*"); connection = _connection_from_file (file, NULL, TYPE_ETHERNET, NULL); g_test_assert_expected_messages (); @@ -785,7 +785,7 @@ test_read_wired_global_gateway_ignore (void) NMSettingIPConfig *s_ip4; char *unmanaged = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring GATEWAY (/etc/sysconfig/network) for * because the connection has no static addresses"); connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-global-gateway-ignore", TEST_IFCFG_DIR"/network-scripts/network-test-wired-global-gateway-ignore", @@ -1120,7 +1120,7 @@ test_read_wired_ipv6_manual (void) NMIPAddress *ip6_addr; NMIPRoute *ip6_route; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring manual default route*"); connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-manual", NULL, TYPE_ETHERNET, &unmanaged); @@ -1492,7 +1492,7 @@ test_read_write_802_1X_subj_matches (void) NMSetting8021x *s_8021x; char *written = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*missing IEEE_8021X_CA_CERT*peap*"); connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-802-1X-subj-matches", NULL, TYPE_ETHERNET, NULL); @@ -1518,7 +1518,7 @@ test_read_write_802_1X_subj_matches (void) TEST_SCRATCH_DIR "/network-scripts/", &written); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*missing IEEE_8021X_CA_CERT*peap*"); reread = _connection_from_file (written, NULL, TYPE_ETHERNET, NULL); g_test_assert_expected_messages (); @@ -1683,7 +1683,7 @@ test_read_wired_aliases_bad (const char *base, const char *expected_id) static void test_read_wired_aliases_bad_1 (void) { - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*aliasem1:1*has no DEVICE*"); test_read_wired_aliases_bad (TEST_IFCFG_DIR "/network-scripts/ifcfg-aliasem1", "System aliasem1"); } @@ -1691,7 +1691,7 @@ test_read_wired_aliases_bad_1 (void) static void test_read_wired_aliases_bad_2 (void) { - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*aliasem2:1*has invalid DEVICE*"); test_read_wired_aliases_bad (TEST_IFCFG_DIR "/network-scripts/ifcfg-aliasem2", "System aliasem2"); } @@ -7326,7 +7326,7 @@ test_read_vlan_reorder_hdr_1 (void) NMConnection *connection; NMSettingVlan *s_vlan; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*REORDER_HDR key is deprecated, use VLAN_FLAGS*"); connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-reorder-hdr-1", NULL, TYPE_ETHERNET, NULL); @@ -8164,7 +8164,7 @@ test_read_dcb_bad_booleans (void) { gs_free_error GError *error = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*invalid DCB_PG_STRICT value*not all 0s and 1s*"); _connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-booleans", NULL, TYPE_ETHERNET, &error); @@ -8179,7 +8179,7 @@ test_read_dcb_short_booleans (void) { gs_free_error GError *error = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*DCB_PG_STRICT value*8 characters*"); _connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-booleans", NULL, TYPE_ETHERNET, &error); @@ -8194,7 +8194,7 @@ test_read_dcb_bad_uints (void) { gs_free_error GError *error = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*invalid DCB_PG_UP2TC value*not 0 - 7*"); _connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-uints", NULL, TYPE_ETHERNET, &error); @@ -8209,7 +8209,7 @@ test_read_dcb_short_uints (void) { gs_free_error GError *error = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*DCB_PG_UP2TC value*8 characters*"); _connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-uints", NULL, TYPE_ETHERNET, &error); @@ -8224,7 +8224,7 @@ test_read_dcb_bad_percent (void) { gs_free_error GError *error = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*invalid DCB_PG_PCT percentage value*"); _connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-percent", NULL, TYPE_ETHERNET, &error); @@ -8239,7 +8239,7 @@ test_read_dcb_short_percent (void) { gs_free_error GError *error = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*invalid DCB_PG_PCT percentage list value*"); _connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-percent", NULL, TYPE_ETHERNET, &error); @@ -8254,7 +8254,7 @@ test_read_dcb_pgpct_not_100 (void) { gs_free_error GError *error = NULL; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*DCB_PG_PCT percentages do not equal 100*"); _connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-pgpct-not-100", NULL, TYPE_ETHERNET, &error); diff --git a/src/settings/plugins/ifnet/tests/test-ifnet.c b/src/settings/plugins/ifnet/tests/test-ifnet.c index c870152b42..7de3b7713a 100644 --- a/src/settings/plugins/ifnet/tests/test-ifnet.c +++ b/src/settings/plugins/ifnet/tests/test-ifnet.c @@ -134,7 +134,7 @@ test_convert_ipv4_config_block (void) check_ip_block (iblock, "192.168.4.121", 24, "202.117.16.1"); destroy_ip_block (iblock); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*Can't handle IPv4 address*202.117.16.1211*"); iblock = convert_ip4_config_block ("eth2"); g_test_assert_expected_messages (); @@ -142,7 +142,7 @@ test_convert_ipv4_config_block (void) check_ip_block (iblock, "192.168.4.121", 24, NULL); destroy_ip_block (iblock); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*missing netmask or prefix*"); iblock = convert_ip4_config_block ("eth3"); g_assert (iblock == NULL); @@ -216,9 +216,9 @@ test_new_connection (void) GError *error = NULL; NMConnection *connection; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*Can't handle IPv4 address*202.117.16.1211*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*Can't handle IPv6 address*202.117.16.1211*"); connection = ifnet_update_connection_from_config_block ("eth2", NULL, &error); g_test_assert_expected_messages (); @@ -306,9 +306,9 @@ test_add_connection (void) kill_backup (&backup); g_object_unref (connection); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*Can't handle ipv4 address: brd, missing netmask or prefix*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*Can't handle ipv4 address: 202.117.16.255, missing netmask or prefix*"); connection = ifnet_update_connection_from_config_block ("myxjtu2", basepath, NULL); g_test_assert_expected_messages (); @@ -349,7 +349,7 @@ test_missing_config (void) GError *error = NULL; NMConnection *connection; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*Unknown config for eth8*"); connection = ifnet_update_connection_from_config_block ("eth8", NULL, &error); g_test_assert_expected_messages (); diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c index 15653880c3..7b66e19861 100644 --- a/src/settings/plugins/keyfile/tests/test-keyfile.c +++ b/src/settings/plugins/keyfile/tests/test-keyfile.c @@ -88,33 +88,33 @@ test_read_valid_wired_connection (void) char expected_mac_address[ETH_ALEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }; gboolean success; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.addresses:*semicolon at the end*addresses1*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.addresses:*semicolon at the end*addresses2*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*missing prefix length*address4*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, - "*missing prefix length*address5*"); g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + "*missing prefix length*address5*"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.routes*semicolon at the end*routes2*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.routes*semicolon at the end*routes3*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.routes*semicolon at the end*routes5*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.routes*semicolon at the end*routes8*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, - "*missing prefix length*address4*"); g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + "*missing prefix length*address4*"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv6.address*semicolon at the end*address5*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, - "*missing prefix length*address5*"); g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + "*missing prefix length*address5*"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv6.address*semicolon at the end*address7*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv6.routes*semicolon at the end*routes1*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv6.route*semicolon at the end*route6*"); connection = nm_keyfile_plugin_connection_from_file (TEST_KEYFILES_DIR "/Test_Wired_Connection", NULL); g_test_assert_expected_messages (); @@ -537,11 +537,11 @@ test_read_wired_mac_case (void) char expected_mac_address[ETH_ALEN] = { 0x00, 0x11, 0xaa, 0xbb, 0xcc, 0x55 }; gboolean success; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.addresses*semicolon at the end*addresses1*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv4.addresses*semicolon at the end*addresses2*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*ipv6.routes*semicolon at the end*routes1*"); connection = nm_keyfile_plugin_connection_from_file (TEST_KEYFILES_DIR "/Test_Wired_Connection_MAC_Case", NULL); g_test_assert_expected_messages (); @@ -1513,9 +1513,9 @@ test_read_wired_8021x_tls_blob_connection (void) gboolean success; GBytes *blob; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*<warn> * keyfile: 802-1x.client-cert: certificate or key file '/CASA/dcbw/Desktop/certinfra/client.pem' does not exist*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*<warn> * keyfile: 802-1x.private-key: certificate or key file '/CASA/dcbw/Desktop/certinfra/client.pem' does not exist*"); connection = nm_keyfile_plugin_connection_from_file (TEST_KEYFILES_DIR "/Test_Wired_TLS_Blob", &error); g_assert_no_error (error); @@ -1576,7 +1576,7 @@ test_read_wired_8021x_tls_bad_path_connection (void) char *tmp2; gboolean success; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*does not exist*"); connection = nm_keyfile_plugin_connection_from_file (TEST_KEYFILES_DIR "/Test_Wired_TLS_Path_Missing", &error); g_test_assert_expected_messages (); @@ -1631,11 +1631,11 @@ test_read_wired_8021x_tls_old_connection (void) const char *tmp; gboolean success; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*<warn> * keyfile: 802-1x.ca-cert: certificate or key file '/CASA/dcbw/Desktop/certinfra/CA/eaptest_ca_cert.pem' does not exist*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*<warn> * keyfile: 802-1x.client-cert: certificate or key file '/CASA/dcbw/Desktop/certinfra/client.pem' does not exist*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*<warn> * keyfile: 802-1x.private-key: certificate or key file '/CASA/dcbw/Desktop/certinfra/client.pem' does not exist*"); connection = nm_keyfile_plugin_connection_from_file (TEST_KEYFILES_DIR "/Test_Wired_TLS_Old", &error); g_assert_no_error (error); diff --git a/src/supplicant-manager/tests/test-supplicant-config.c b/src/supplicant-manager/tests/test-supplicant-config.c index 0c3e9a47d0..881f44f6bf 100644 --- a/src/supplicant-manager/tests/test-supplicant-config.c +++ b/src/supplicant-manager/tests/test-supplicant-config.c @@ -149,13 +149,13 @@ test_wifi_open (void) config = nm_supplicant_config_new (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'ssid' value 'Test SSID'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'scan_ssid' value '1'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'bssid' value '11:22:33:44:55:66'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'freq_list' value *"); g_assert (nm_supplicant_config_add_setting_wireless (config, s_wifi, @@ -166,7 +166,7 @@ test_wifi_open (void) g_assert_no_error (error); g_test_assert_expected_messages (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'key_mgmt' value 'NONE'"); g_assert (nm_supplicant_config_add_no_security (config, &error)); g_assert_no_error (error); @@ -254,13 +254,13 @@ test_wifi_wep_key (const char *detail, config = nm_supplicant_config_new (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'ssid' value 'Test SSID'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'scan_ssid' value '1'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'bssid' value '11:22:33:44:55:66'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'freq_list' value *"); g_assert (nm_supplicant_config_add_setting_wireless (config, s_wifi, @@ -271,11 +271,11 @@ test_wifi_wep_key (const char *detail, g_assert_no_error (error); g_test_assert_expected_messages (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'key_mgmt' value 'NONE'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'wep_key0' value *"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'wep_tx_keyidx' value '0'"); g_assert (nm_supplicant_config_add_setting_wireless_security (config, s_wsec, @@ -399,13 +399,13 @@ test_wifi_wpa_psk (const char *detail, config = nm_supplicant_config_new (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'ssid' value 'Test SSID'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'scan_ssid' value '1'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'bssid' value '11:22:33:44:55:66'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'freq_list' value *"); g_assert (nm_supplicant_config_add_setting_wireless (config, s_wifi, @@ -416,15 +416,15 @@ test_wifi_wpa_psk (const char *detail, g_assert_no_error (error); g_test_assert_expected_messages (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'key_mgmt' value 'WPA-PSK'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'psk' value *"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'proto' value 'WPA RSN'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'pairwise' value 'TKIP CCMP'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'group' value 'TKIP CCMP'"); g_assert (nm_supplicant_config_add_setting_wireless_security (config, s_wsec, @@ -546,13 +546,13 @@ test_wifi_eap (void) config = nm_supplicant_config_new (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'ssid' value 'Test SSID'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'scan_ssid' value '1'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'bssid' value '11:22:33:44:55:66'*"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'freq_list' value *"); g_assert (nm_supplicant_config_add_setting_wireless (config, s_wifi, @@ -563,25 +563,25 @@ test_wifi_eap (void) g_assert_no_error (error); g_test_assert_expected_messages (); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'key_mgmt' value 'WPA-EAP'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'proto' value 'WPA RSN'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'pairwise' value 'TKIP CCMP'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*added 'group' value 'TKIP CCMP'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*Config: added 'eap' value 'TLS'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*Config: added 'fragment_size' value '1086'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "* Config: added 'ca_cert' value '*/test-ca-cert.pem'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "* Config: added 'private_key' value '*/test-cert.p12'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*Config: added 'bgscan' value 'simple:30:-65:300'"); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*Config: added 'proactive_key_caching' value '1'"); g_assert (nm_supplicant_config_add_setting_wireless_security (config, s_wsec, diff --git a/src/tests/config/test-config.c b/src/tests/config/test-config.c index 19306df723..d83ff4b5c5 100644 --- a/src/tests/config/test-config.c +++ b/src/tests/config/test-config.c @@ -343,7 +343,7 @@ test_config_no_auto_default (void) g_assert (!nm_config_get_no_auto_default_for_device (config, dev3)); g_assert (nm_config_get_no_auto_default_for_device (config, dev4)); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: update * (no-auto-default)*"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: update * (no-auto-default)*"); nm_config_set_no_auto_default_for_device (config, dev3); g_test_assert_expected_messages (); @@ -556,9 +556,9 @@ _set_values_user (NMConfig *config, config_data_before = g_object_ref (nm_config_get_data (config)); if (expected_changes != NM_CONFIG_CHANGE_NONE) - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: update *"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: update *"); else - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: signal SIGHUP (no changes from disk)*"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: signal SIGHUP (no changes from disk)*"); nm_config_reload (config, SIGHUP); @@ -600,7 +600,7 @@ _set_values_intern (NMConfig *config, &config_changed_data); if (expected_changes != NM_CONFIG_CHANGE_NONE) - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: update *"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: update *"); nm_config_set_values (config, keyfile_intern, TRUE, FALSE); @@ -863,15 +863,15 @@ test_config_signal (void) &expected); expected = NM_CONFIG_CHANGE_SIGUSR1; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: signal SIGUSR1"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: signal SIGUSR1"); nm_config_reload (config, SIGUSR1); expected = NM_CONFIG_CHANGE_SIGUSR2; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: signal SIGUSR2"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: signal SIGUSR2"); nm_config_reload (config, SIGUSR2); expected = NM_CONFIG_CHANGE_SIGHUP; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: signal SIGHUP (no changes from disk)*"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: signal SIGHUP (no changes from disk)*"); nm_config_reload (config, SIGHUP); @@ -884,7 +884,7 @@ test_config_signal (void) G_CALLBACK (_test_signal_config_changed_cb2), &expected); expected = NM_CONFIG_CHANGE_SIGUSR2; - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*config: signal SIGUSR2"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_INFO, "*config: signal SIGUSR2"); nm_config_reload (config, SIGUSR2); g_signal_handlers_disconnect_by_func (config, _test_signal_config_changed_cb2, &expected); diff --git a/src/tests/test-general-with-expect.c b/src/tests/test-general-with-expect.c index 43595c8de3..64b47bd38c 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -304,7 +304,7 @@ test_nm_utils_kill_child (void) test_nm_utils_kill_child_sync_do ("test-s-2", pid2s, SIGTERM, 3000, TRUE, &expected_exit_47); /* send invalid signal. */ - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*kill child process 'test-s-3-0' (*): failed to send Unexpected signal: Invalid argument (22)"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*kill child process 'test-s-3-0' (*): failed to send Unexpected signal: Invalid argument (22)"); test_nm_utils_kill_child_sync_do ("test-s-3-0", pid3s, -1, 0, FALSE, NULL); /* really kill pid3s */ @@ -314,7 +314,7 @@ test_nm_utils_kill_child (void) /* pid3s should not be a valid process, hence the call should fail. Note, that there * is a race here. */ - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*kill child process 'test-s-3-2' (*): failed due to unexpected return value -1 by waitpid (No child processes, 10) after sending no signal (0)"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*kill child process 'test-s-3-2' (*): failed due to unexpected return value -1 by waitpid (No child processes, 10) after sending no signal (0)"); test_nm_utils_kill_child_sync_do ("test-s-3-2", pid3s, 0, 0, FALSE, NULL); g_test_expect_message ("NetworkManager", G_LOG_LEVEL_DEBUG, "*kill child process 'test-s-4' (*): waiting up to 1 milliseconds for process to terminate normally after sending SIGTERM (15)..."); @@ -340,7 +340,7 @@ test_nm_utils_kill_child (void) g_test_expect_message ("NetworkManager", G_LOG_LEVEL_DEBUG, "*kill child process 'test-a-2' (*): invoke callback: terminated normally with status 47"); test_nm_utils_kill_child_async_do ("test-a-2", pid2a, SIGTERM, 3000, TRUE, &expected_exit_47); - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*kill child process 'test-a-3-0' (*): unexpected error sending Unexpected signal: Invalid argument (22)"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*kill child process 'test-a-3-0' (*): unexpected error sending Unexpected signal: Invalid argument (22)"); g_test_expect_message ("NetworkManager", G_LOG_LEVEL_DEBUG, "*kill child process 'test-a-3-0' (*): invoke callback: killing child failed"); /* coverity[negative_returns] */ test_nm_utils_kill_child_async_do ("test-a-3-0", pid3a, -1, 1000 / 2, FALSE, NULL); @@ -351,7 +351,7 @@ test_nm_utils_kill_child (void) /* pid3a should not be a valid process, hence the call should fail. Note, that there * is a race here. */ - g_test_expect_message ("NetworkManager", G_LOG_LEVEL_WARNING, "*kill child process 'test-a-3-2' (*): failed due to unexpected return value -1 by waitpid (No child processes, 10) after sending no signal (0)"); + g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*kill child process 'test-a-3-2' (*): failed due to unexpected return value -1 by waitpid (No child processes, 10) after sending no signal (0)"); g_test_expect_message ("NetworkManager", G_LOG_LEVEL_DEBUG, "*kill child process 'test-a-3-2' (*): invoke callback: killing child failed"); test_nm_utils_kill_child_async_do ("test-a-3-2", pid3a, 0, 0, FALSE, NULL); |