ASSERT (len > 0, test, "blob key file invalid (size 0)");
- ASSERT (len == g_bytes_get_size (key),
- test, "blob key file (%d) and setting key data (%d) lengths don't match",
- len, g_bytes_get_size (key));
+ g_assert_cmpint (len, ==, g_bytes_get_size (key));
ASSERT (memcmp (contents, g_bytes_get_data (key, NULL), len) == 0,
test, "blob key file and blob key data don't match");
ASSERT (len > 0, test, "blob key file invalid (size 0)");
- ASSERT (len == key->len,
- test, "blob key file (%d) and setting key data (%d) lengths don't match",
- len, key->len);
+ g_assert_cmpint (len, ==, key->len);
ASSERT (memcmp (contents, key->data, len) == 0,
test, "blob key file and blob key data don't match");
NM_SETTING_802_1X_CK_SCHEME_PATH,
NULL,
&error);
- ASSERT (success == TRUE,
- "wired-8021x-peap-mschapv2-verify-8021x", "failed to verify %s: could not load CA certificate",
- TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2,
- NM_SETTING_802_1X_SETTING_NAME,
- NM_SETTING_802_1X_CA_CERT);
+ g_assert (success == TRUE);
+
expected_ca_cert_path = nm_setting_802_1x_get_ca_cert_path (tmp_8021x);
- ASSERT (expected_ca_cert_path != NULL,
- "wired-8021x-peap-mschapv2-verify-8021x", "failed to verify %s: failed to get CA certificate",
- TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2,
- NM_SETTING_802_1X_SETTING_NAME,
- NM_SETTING_802_1X_CA_CERT);
+ g_assert (expected_ca_cert_path);
read_ca_cert_path = nm_setting_802_1x_get_ca_cert_path (s_8021x);
ASSERT (read_ca_cert_path != NULL,
ip[j] = NULL;
}
- for (i = 0; i < num_addresses; i++) {
- ASSERT (ip[i] == 0,
- "wired-aliases-write-verify-ip4", "failed to verify %s: did not find IP4 address 0x%08x",
- testfile,
- ip[i]);
- }
+ for (i = 0; i < num_addresses; i++)
+ g_assert (!ip[i]);
/* Gateway */
g_assert_cmpstr (nm_setting_ip_config_get_gateway (s_ip4), ==, "1.1.1.1");
connection = nm_simple_connection_new();
ifupdown_update_connection_from_if_block(connection, block, &error);
- ASSERT (connection != NULL,
- TEST18_NAME
- "failed to read %s: %s", file, error->message);
+ g_assert (connection != NULL);
ASSERT (nm_connection_verify (connection, &error),
TEST18_NAME,