+ nmtst_assert_connection_unnormalizable (connections->pdata[idx[3]], 0, 0);
+
+ /**************************************************************************
+ * Modify the invalid connection (still invalid)
+ *************************************************************************/
+
+ NMTST_VARIANT_EDITOR (variant,
+ NMTST_VARIANT_CHANGE_PROPERTY ("invalid-type-2",
+ "some-key2", "u", 4721));
+ g_variant_ref_sink (variant);
+ nmtstc_service_update_connection_variant (my_sinfo,
+ path2,
+ variant,
+ FALSE);
+
+ g_test_expect_message ("libnm", G_LOG_LEVEL_WARNING, "*replace_settings: error updating connection /org/freedesktop/NetworkManager/Settings/Connection/3 settings: *");
+ nmtst_main_loop_run (loop, 100);
+ g_test_assert_expected_messages ();
+
+ connections = nm_client_get_connections (client);
+ g_assert (connections);
+
+ g_assert_cmpint (connections->len, ==, 4);
+ n_found = nmtst_find_all_indexes (connections->pdata,
+ connections->len,
+ (gpointer *) ((const char *[]) { path0, path1, path2, path3 }),
+ 4,
+ _test_connection_invalid_find_connections,
+ NULL,
+ idx);
+ g_assert_cmpint (n_found, ==, 4);
+ ASSERT_IDX (0);
+ ASSERT_IDX (1);
+ ASSERT_IDX (2);
+ ASSERT_IDX (3);
+ nmtst_assert_connection_verifies_without_normalization (connections->pdata[idx[0]]);
+ nmtst_assert_connection_unnormalizable (connections->pdata[idx[1]], 0, 0);
+ nmtst_assert_connection_unnormalizable (connections->pdata[idx[2]], 0, 0);
+ nmtst_assert_connection_unnormalizable (connections->pdata[idx[3]], 0, 0);
+
+ /**************************************************************************
+ * Modify the invalid connection (becomes valid)
+ *************************************************************************/
+
+ NMTST_VARIANT_EDITOR (variant,
+ NMTST_VARIANT_DROP_SETTING ("invalid-type-2"));
+ NMTST_VARIANT_EDITOR (variant,
+ NMTST_VARIANT_CHANGE_PROPERTY (NM_SETTING_CONNECTION_SETTING_NAME,
+ NM_SETTING_CONNECTION_TYPE, "s", NM_SETTING_WIRED_SETTING_NAME));
+ g_variant_ref_sink (variant);
+ nmtstc_service_update_connection_variant (my_sinfo,
+ path2,
+ variant,
+ FALSE);
+
+ nmtst_main_loop_run (loop, 100);
+
+ connections = nm_client_get_connections (client);
+ g_assert (connections);
+
+ g_assert_cmpint (connections->len, ==, 4);
+ n_found = nmtst_find_all_indexes (connections->pdata,
+ connections->len,
+ (gpointer *) ((const char *[]) { path0, path1, path2, path3 }),
+ 4,
+ _test_connection_invalid_find_connections,
+ NULL,
+ idx);
+ g_assert_cmpint (n_found, ==, 4);
+ ASSERT_IDX (0);
+ ASSERT_IDX (1);
+ ASSERT_IDX (2);
+ ASSERT_IDX (3);
+ nmtst_assert_connection_verifies_without_normalization (connections->pdata[idx[0]]);
+ nmtst_assert_connection_unnormalizable (connections->pdata[idx[1]], 0, 0);
+ nmtst_assert_connection_verifies_after_normalization (connections->pdata[idx[2]], 0, 0);
+ nmtst_assert_connection_unnormalizable (connections->pdata[idx[3]], 0, 0);