Lines Matching refs:ifa1

123 	reset_test_iface_networking(ifa1);  in conn_mgr_conn_before()
133 reset_test_iface_state(ifa1); in conn_mgr_conn_before()
174 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
198 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
203 zassert_equal(net_if_up(ifa1), 0, "net_if_up should not fail"); in ZTEST()
209 zassert_false(net_if_is_up(ifa1), "Ifaces must be disconnected before test"); in ZTEST()
214 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should not fail"); in ZTEST()
218 zassert_true(net_if_is_up(ifa1), "ifa1 should be oper-up after conn_mgr_if_connect"); in ZTEST()
240 zassert_true(net_if_is_up(ifa1), "ifa1 should still be connected"); in ZTEST()
262 zassert_true(net_if_is_up(ifa1), "ifa1 should still be connected"); in ZTEST()
280 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, "conn_mgr_if_disconnect should not fail"); in ZTEST()
285 zassert_false(net_if_is_up(ifa1), "ifa1 should be oper-down after conn_mgr_if_disconnect"); in ZTEST()
308 zassert_false(net_if_is_up(ifa1), "ifa1 should still be disconnected"); in ZTEST()
331 zassert_false(net_if_is_up(ifa1), "ifa1 should still be disconnected"); in ZTEST()
352 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
355 zassert_equal(net_if_up(ifa1), 0, "net_if_up should not fail"); in ZTEST()
358 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should not fail"); in ZTEST()
362 zassert_true(net_if_is_up(ifa1), "ifa1 should be oper-up after conn_mgr_if_connect"); in ZTEST()
367 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should not fail"); in ZTEST()
374 zassert_true(net_if_is_up(ifa1), "ifa1 should still be connected"); in ZTEST()
379 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, "conn_mgr_if_disconnect should not fail"); in ZTEST()
383 zassert_false(net_if_is_up(ifa1), "ifa1 should be oper-down after conn_mgr_if_disconnect"); in ZTEST()
388 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, "conn_mgr_if_disconnect should not fail"); in ZTEST()
392 zassert_false(net_if_is_up(ifa1), "ifa1 should be oper-down after conn_mgr_if_disconnect"); in ZTEST()
402 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
405 zassert_equal(net_if_up(ifa1), 0, "net_if_up should not fail"); in ZTEST()
408 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should not fail"); in ZTEST()
409 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should not fail"); in ZTEST()
413 zassert_true(net_if_is_up(ifa1), "ifa1 should be oper-up after conn_mgr_if_connect"); in ZTEST()
418 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, "conn_mgr_if_disconnect should not fail"); in ZTEST()
419 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, "conn_mgr_if_disconnect should not fail"); in ZTEST()
423 zassert_false(net_if_is_up(ifa1), "ifa1 should be oper-down after conn_mgr_if_disconnect"); in ZTEST()
431 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
434 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should not fail"); in ZTEST()
438 zassert_true(net_if_is_admin_up(ifa1), "ifa1 should be admin-up after conn_mgr_if_connect"); in ZTEST()
441 zassert_true(net_if_is_up(ifa1), "ifa1 should be oper-up after conn_mgr_if_connect"); in ZTEST()
449 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
452 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, "conn_mgr_if_disconnect should not fail."); in ZTEST()
456 zassert_false(net_if_is_admin_up(ifa1), "ifa1 should be still be admin-down."); in ZTEST()
513 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
519 zassert_equal(net_if_up(ifa1), 0, in ZTEST()
523 zassert_equal(conn_mgr_if_connect(ifa1), -ECHILD, in ZTEST()
530 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
533 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed"); in ZTEST()
534 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed"); in ZTEST()
540 zassert_equal(conn_mgr_if_disconnect(ifa1), -EDOM, in ZTEST()
548 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
554 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed"); in ZTEST()
556 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed"); in ZTEST()
559 zassert_false(net_if_is_up(ifa1), "ifa1 should not be up if instructed to time out"); in ZTEST()
572 zassert_equal(stats.event_iface, ifa1, in ZTEST()
580 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
586 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed"); in ZTEST()
587 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed"); in ZTEST()
590 zassert_false(net_if_is_up(ifa1), "ifa1 should not be up if instructed to time out"); in ZTEST()
603 zassert_equal(stats.event_iface, ifa1, in ZTEST()
614 zassert_true(conn_mgr_if_is_bound(ifa1)); in ZTEST()
632 zassert_equal(conn_mgr_if_set_opt(ifa1, TEST_CONN_OPT_X, &buf, strlen(buf) + 1), 0, in ZTEST()
638 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_X, &buf, &buf_len), in ZTEST()
648 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_Y, &buf, &buf_len), in ZTEST()
663 zassert_equal(conn_mgr_if_set_opt(ifa1, TEST_CONN_OPT_Y, &buf, strlen(buf) + 1), 0, in ZTEST()
669 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_Y, &buf, &buf_len), in ZTEST()
678 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_X, &buf, &buf_len), in ZTEST()
690 zassert_equal(conn_mgr_if_set_opt(ifa1, TEST_CONN_OPT_X, &buf, strlen(buf) + 1), 0, in ZTEST()
696 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_X, &buf, &buf_len), 0, in ZTEST()
710 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_X, &buf, &buf_len), 0, in ZTEST()
727 zassert_equal(conn_mgr_if_set_opt(ifa1, -1, "A", strlen("A")), -ENOPROTOOPT, in ZTEST()
730 zassert_equal(conn_mgr_if_get_opt(ifa1, -1, buf, &buf_len), -ENOPROTOOPT, in ZTEST()
735 zassert_equal(conn_mgr_if_set_opt(ifa1, TEST_CONN_OPT_X, NULL, 100), -EINVAL, in ZTEST()
738 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_X, NULL, &buf_len), -EINVAL, in ZTEST()
743 zassert_equal(conn_mgr_if_get_opt(ifa1, TEST_CONN_OPT_X, buf, NULL), -EINVAL, in ZTEST()
774 struct conn_mgr_conn_binding *ifa1_binding = conn_mgr_if_get_binding(ifa1); in ZTEST()
780 zassert_equal(conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, true), 0, in ZTEST()
784 zassert_true(conn_mgr_if_get_flag(ifa1, CONN_MGR_IF_PERSISTENT), in ZTEST()
792 zassert_equal(conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, true), 0, in ZTEST()
796 zassert_true(conn_mgr_if_get_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT), in ZTEST()
805 zassert_equal(conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, false), 0, in ZTEST()
809 zassert_false(conn_mgr_if_get_flag(ifa1, CONN_MGR_IF_PERSISTENT), in ZTEST()
817 zassert_equal(conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, false), 0, in ZTEST()
821 zassert_false(conn_mgr_if_get_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT), in ZTEST()
841 zassert_equal(conn_mgr_if_set_flag(ifa1, invalid_flag, true), -EINVAL, in ZTEST()
849 zassert_false(conn_mgr_if_get_flag(ifa1, invalid_flag), in ZTEST()
857 struct conn_mgr_conn_binding *ifa1_binding = conn_mgr_if_get_binding(ifa1); in ZTEST()
860 zassert_equal(conn_mgr_if_set_timeout(ifa1, 99), 0, in ZTEST()
864 zassert_equal(conn_mgr_if_get_timeout(ifa1), 99, in ZTEST()
872 zassert_equal(conn_mgr_if_set_timeout(ifa1, CONN_MGR_IF_NO_TIMEOUT), 0, in ZTEST()
876 zassert_equal(conn_mgr_if_get_timeout(ifa1), CONN_MGR_IF_NO_TIMEOUT, in ZTEST()
907 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, true); in ZTEST()
910 zassert_equal(net_if_up(ifa1), 0, "net_if_up should not fail."); in ZTEST()
914 zassert_false(net_if_is_up(ifa1), "Auto-connect should not trigger if disabled."); in ZTEST()
917 zassert_equal(net_if_down(ifa1), 0, "net_if_down should not fail."); in ZTEST()
920 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, false); in ZTEST()
923 zassert_equal(net_if_up(ifa1), 0, "net_if_up should not fail."); in ZTEST()
927 zassert_true(net_if_is_up(ifa1), "Auto-connect should succeed if enabled."); in ZTEST()
936 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, false); in ZTEST()
939 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, false); in ZTEST()
940 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, false); in ZTEST()
943 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
947 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
950 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, in ZTEST()
955 zassert_false(net_if_is_admin_up(ifa1), in ZTEST()
961 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, true); in ZTEST()
964 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
968 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
971 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, in ZTEST()
976 zassert_false(net_if_is_admin_up(ifa1), in ZTEST()
982 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, true); in ZTEST()
985 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
989 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
992 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, in ZTEST()
996 zassert_true(net_if_is_admin_up(ifa1), in ZTEST()
1006 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, false); in ZTEST()
1009 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, false); in ZTEST()
1010 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, false); in ZTEST()
1013 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
1017 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
1020 simulate_connection_loss(ifa1); in ZTEST()
1024 zassert_false(net_if_is_admin_up(ifa1), in ZTEST()
1028 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, true); in ZTEST()
1031 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
1035 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
1038 simulate_connection_loss(ifa1); in ZTEST()
1042 zassert_true(net_if_is_admin_up(ifa1), in ZTEST()
1046 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, false); in ZTEST()
1047 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, true); in ZTEST()
1050 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed."); in ZTEST()
1054 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
1057 simulate_connection_loss(ifa1); in ZTEST()
1061 zassert_true(net_if_is_admin_up(ifa1), in ZTEST()
1070 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
1073 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, false); in ZTEST()
1076 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, true); in ZTEST()
1077 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, false); in ZTEST()
1083 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
1087 zassert_false(net_if_is_admin_up(ifa1), in ZTEST()
1091 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, true); in ZTEST()
1094 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
1098 zassert_true(net_if_is_admin_up(ifa1), in ZTEST()
1109 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_CONNECT, false); in ZTEST()
1112 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_PERSISTENT, true); in ZTEST()
1113 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, false); in ZTEST()
1116 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
1120 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
1123 simulate_fatal_error(ifa1, -EAGAIN); in ZTEST()
1127 zassert_false(net_if_is_admin_up(ifa1), in ZTEST()
1131 conn_mgr_if_set_flag(ifa1, CONN_MGR_IF_NO_AUTO_DOWN, true); in ZTEST()
1134 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed."); in ZTEST()
1138 zassert_true(net_if_is_up(ifa1), "Connection should succeed."); in ZTEST()
1141 simulate_fatal_error(ifa1, -EAGAIN); in ZTEST()
1145 zassert_true(net_if_is_admin_up(ifa1), in ZTEST()
1155 conn_mgr_ignore_iface(ifa1); in ZTEST()
1162 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1171 zassert_equal(net_if_down(ifa1), 0, "net_if_down should succeed for all ifaces."); in ZTEST()
1190 zassert_false(net_if_is_admin_up(ifa1), "Ignored iface should not be admin-up."); in ZTEST()
1199 conn_mgr_ignore_iface(ifa1); in ZTEST()
1207 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1215 zassert_true(net_if_is_up(ifa1), "All bound ifaces should be connected."); in ZTEST()
1221 zassert_equal(conn_mgr_if_disconnect(ifa1), 0, "net_if_disconnect should succeed."); in ZTEST()
1226 zassert_equal(net_if_down(ifa1), 0, "net_if_down should succeed for all ifaces."); in ZTEST()
1244 zassert_false(net_if_is_admin_up(ifa1), "All ignored ifaces should be admin-down."); in ZTEST()
1252 zassert_false(net_if_is_up(ifa1), "Ignored iface should not be connected."); in ZTEST()
1261 conn_mgr_ignore_iface(ifa1); in ZTEST()
1264 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed for all ifaces."); in ZTEST()
1277 zassert_false(net_if_is_admin_up(ifa1), "All ifaces should be admin-down."); in ZTEST()
1285 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed for all ifaces."); in ZTEST()
1304 zassert_true(net_if_is_admin_up(ifa1), "Ignored iface should be admin-up."); in ZTEST()
1313 conn_mgr_ignore_iface(ifa1); in ZTEST()
1316 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed for all ifaces."); in ZTEST()
1325 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed."); in ZTEST()
1337 zassert_false(net_if_is_up(ifa1), "All bound ifaces should be disconnected."); in ZTEST()
1343 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1351 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed."); in ZTEST()
1367 zassert_true(net_if_is_up(ifa1), "Ignored iface should still be connected"); in ZTEST()
1387 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1399 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed for all ifaces."); in ZTEST()
1420 zassert_false(net_if_is_admin_up(ifa1), "All ifaces should be admin-down."); in ZTEST()
1444 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1458 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed for all ifaces."); in ZTEST()
1467 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed."); in ZTEST()
1486 zassert_false(net_if_is_up(ifa1), "All bound ifaces should be disconnected."); in ZTEST()
1492 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1513 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
1524 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1537 zassert_false(net_if_is_up(ifa1), "The failing iface should not be connected."); in ZTEST()
1543 struct test_conn_data *ifa1_data = conn_mgr_if_get_data(ifa1); in ZTEST()
1546 zassert_equal(net_if_up(ifa1), 0, "net_if_up should succeed for all ifaces."); in ZTEST()
1555 zassert_equal(conn_mgr_if_connect(ifa1), 0, "conn_mgr_if_connect should succeed."); in ZTEST()
1569 zassert_true(net_if_is_admin_up(ifa1), "All ifaces should be admin-up."); in ZTEST()
1582 zassert_true(net_if_is_up(ifa1), "The failing iface should not be disconnected."); in ZTEST()