Lines Matching refs:fixture

36 static void mock_init_rule_before(const struct ztest_unit_test *test, void *fixture)  in mock_init_rule_before()  argument
42 static void mock_destroy_rule_after(const struct ztest_unit_test *test, void *fixture) in mock_destroy_rule_after() argument
56 struct bap_broadcast_source_test_suite_fixture *fixture) in bap_broadcast_source_test_suite_fixture_init() argument
82 fixture->param = malloc(sizeof(struct bt_bap_broadcast_source_param)); in bap_broadcast_source_test_suite_fixture_init()
99 memset(fixture->param, 0, sizeof(*fixture->param)); in bap_broadcast_source_test_suite_fixture_init()
130 fixture->param->params_count = CONFIG_BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT; in bap_broadcast_source_test_suite_fixture_init()
131 fixture->param->params = subgroup_param; in bap_broadcast_source_test_suite_fixture_init()
132 fixture->param->qos = qos_cfg; in bap_broadcast_source_test_suite_fixture_init()
133 fixture->param->encryption = false; in bap_broadcast_source_test_suite_fixture_init()
134 memset(fixture->param->broadcast_code, 0, sizeof(fixture->param->broadcast_code)); in bap_broadcast_source_test_suite_fixture_init()
135 fixture->param->packing = BT_ISO_PACKING_SEQUENTIAL; in bap_broadcast_source_test_suite_fixture_init()
137 fixture->stream_cnt = fixture->param->params_count * streams_per_subgroup; in bap_broadcast_source_test_suite_fixture_init()
142 struct bap_broadcast_source_test_suite_fixture *fixture; in bap_broadcast_source_test_suite_setup() local
144 fixture = malloc(sizeof(*fixture)); in bap_broadcast_source_test_suite_setup()
145 zassert_not_null(fixture); in bap_broadcast_source_test_suite_setup()
147 return fixture; in bap_broadcast_source_test_suite_setup()
163 struct bap_broadcast_source_test_suite_fixture *fixture = f; in bap_broadcast_source_test_suite_after() local
166 if (fixture->source != NULL) { in bap_broadcast_source_test_suite_after()
169 (void)bt_bap_broadcast_source_stop(fixture->source); in bap_broadcast_source_test_suite_after()
171 err = bt_bap_broadcast_source_delete(fixture->source); in bap_broadcast_source_test_suite_after()
173 fixture->source = NULL; in bap_broadcast_source_test_suite_after()
176 param = fixture->param; in bap_broadcast_source_test_suite_after()
200 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
204 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
206 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
223 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
225 fixture->source = NULL; in ZTEST_F()
230 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
235 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
237 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
240 err = bt_bap_broadcast_source_start(fixture->source, &ext_adv); in ZTEST_F()
243 zexpect_call_count("bt_bap_stream_ops.connected", fixture->stream_cnt, in ZTEST_F()
245 zexpect_call_count("bt_bap_stream_ops.started", fixture->stream_cnt, in ZTEST_F()
275 zexpect_call_count("bt_bap_stream_ops.sent", fixture->stream_cnt, in ZTEST_F()
278 err = bt_bap_broadcast_source_stop(fixture->source); in ZTEST_F()
281 zexpect_call_count("bt_bap_stream_ops.disconnected", fixture->stream_cnt, in ZTEST_F()
283 zexpect_call_count("bt_bap_stream_ops.stopped", fixture->stream_cnt, in ZTEST_F()
288 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
290 fixture->source = NULL; in ZTEST_F()
297 err = bt_bap_broadcast_source_create(NULL, &fixture->source); in ZTEST_F()
303 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
312 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
316 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
323 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
327 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
333 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
338 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
346 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
351 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
359 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
363 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
370 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
375 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
383 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
388 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
396 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
402 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
411 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
417 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
426 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
432 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
439 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
445 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
452 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
459 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
466 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
473 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
480 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
487 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
495 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
503 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
514 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
520 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
527 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
532 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
534 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
543 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
547 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
549 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
552 err = bt_bap_broadcast_source_start(fixture->source, NULL); in ZTEST_F()
558 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
563 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
565 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
568 err = bt_bap_broadcast_source_start(fixture->source, &ext_adv); in ZTEST_F()
571 err = bt_bap_broadcast_source_start(fixture->source, &ext_adv); in ZTEST_F()
577 struct bt_bap_broadcast_source_param *reconf_param = fixture->param; in ZTEST_F()
582 reconf_param->params_count, fixture->stream_cnt); in ZTEST_F()
584 err = bt_bap_broadcast_source_create(reconf_param, &fixture->source); in ZTEST_F()
606 err = bt_bap_broadcast_source_reconfig(fixture->source, reconf_param); in ZTEST_F()
623 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
625 fixture->source = NULL; in ZTEST_F()
630 struct bt_bap_broadcast_source_param *reconf_param = fixture->param; in ZTEST_F()
634 reconf_param->params_count, fixture->stream_cnt); in ZTEST_F()
636 err = bt_bap_broadcast_source_create(reconf_param, &fixture->source); in ZTEST_F()
657 err = bt_bap_broadcast_source_reconfig(fixture->source, reconf_param); in ZTEST_F()
674 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
676 fixture->source = NULL; in ZTEST_F()
681 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
685 param->params_count, fixture->stream_cnt); in ZTEST_F()
687 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
690 err = bt_bap_broadcast_source_reconfig(fixture->source, NULL); in ZTEST_F()
693 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
695 fixture->source = NULL; in ZTEST_F()
700 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
704 param->params_count, fixture->stream_cnt); in ZTEST_F()
706 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
712 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
714 fixture->source = NULL; in ZTEST_F()
720 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
724 param->params_count, fixture->stream_cnt); in ZTEST_F()
726 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
730 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
733 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
735 fixture->source = NULL; in ZTEST_F()
741 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
745 param->params_count, fixture->stream_cnt); in ZTEST_F()
747 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
751 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
754 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
756 fixture->source = NULL; in ZTEST_F()
762 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
767 param->params_count, fixture->stream_cnt); in ZTEST_F()
769 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
773 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
778 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
780 fixture->source = NULL; in ZTEST_F()
785 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
790 param->params_count, fixture->stream_cnt); in ZTEST_F()
792 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
796 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
801 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
803 fixture->source = NULL; in ZTEST_F()
808 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
812 param->params_count, fixture->stream_cnt); in ZTEST_F()
814 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
818 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
821 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
823 fixture->source = NULL; in ZTEST_F()
829 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
834 param->params_count, fixture->stream_cnt); in ZTEST_F()
836 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
840 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
844 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
846 fixture->source = NULL; in ZTEST_F()
852 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
857 param->params_count, fixture->stream_cnt); in ZTEST_F()
859 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
863 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
867 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
869 fixture->source = NULL; in ZTEST_F()
875 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
881 param->params_count, fixture->stream_cnt); in ZTEST_F()
883 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
887 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
892 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
894 fixture->source = NULL; in ZTEST_F()
900 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
906 param->params_count, fixture->stream_cnt); in ZTEST_F()
908 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
912 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
917 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
919 fixture->source = NULL; in ZTEST_F()
925 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
931 param->params_count, fixture->stream_cnt); in ZTEST_F()
933 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
937 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
940 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
942 fixture->source = NULL; in ZTEST_F()
948 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
954 param->params_count, fixture->stream_cnt); in ZTEST_F()
956 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
960 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
963 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
965 fixture->source = NULL; in ZTEST_F()
971 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
977 param->params_count, fixture->stream_cnt); in ZTEST_F()
979 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
984 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
987 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
989 fixture->source = NULL; in ZTEST_F()
995 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
1001 param->params_count, fixture->stream_cnt); in ZTEST_F()
1003 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
1008 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
1011 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1013 fixture->source = NULL; in ZTEST_F()
1019 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
1026 param->params_count, fixture->stream_cnt); in ZTEST_F()
1028 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
1032 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
1037 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1039 fixture->source = NULL; in ZTEST_F()
1045 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
1052 param->params_count, fixture->stream_cnt); in ZTEST_F()
1054 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
1059 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
1067 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1069 fixture->source = NULL; in ZTEST_F()
1075 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
1081 param->params_count, fixture->stream_cnt); in ZTEST_F()
1083 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
1087 err = bt_bap_broadcast_source_reconfig(fixture->source, param); in ZTEST_F()
1091 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1093 fixture->source = NULL; in ZTEST_F()
1098 struct bt_bap_broadcast_source_param *param = fixture->param; in ZTEST_F()
1103 param->params_count, fixture->stream_cnt); in ZTEST_F()
1105 err = bt_bap_broadcast_source_create(param, &fixture->source); in ZTEST_F()
1107 source = fixture->source; in ZTEST_F()
1109 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1111 fixture->source = NULL; in ZTEST_F()
1119 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1124 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1126 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1129 err = bt_bap_broadcast_source_start(fixture->source, &ext_adv); in ZTEST_F()
1138 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1143 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1145 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1148 err = bt_bap_broadcast_source_start(fixture->source, &ext_adv); in ZTEST_F()
1151 err = bt_bap_broadcast_source_stop(fixture->source); in ZTEST_F()
1169 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1174 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1176 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1179 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1182 source = fixture->source; in ZTEST_F()
1184 fixture->source = NULL; in ZTEST_F()
1192 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1218 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1220 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1223 err = bt_bap_broadcast_source_get_base(fixture->source, &base_buf); in ZTEST_F()
1242 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1244 fixture->source = NULL; in ZTEST_F()
1249 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1281 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1283 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1286 err = bt_bap_broadcast_source_get_base(fixture->source, &base_buf); in ZTEST_F()
1305 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1307 fixture->source = NULL; in ZTEST_F()
1322 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1326 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1328 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1331 err = bt_bap_broadcast_source_get_base(fixture->source, NULL); in ZTEST_F()
1334 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1336 fixture->source = NULL; in ZTEST_F()
1341 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1348 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1350 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1353 source = fixture->source; in ZTEST_F()
1355 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1357 fixture->source = NULL; in ZTEST_F()
1366 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1372 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1374 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1377 err = bt_bap_broadcast_source_get_base(fixture->source, &base_buf); in ZTEST_F()
1380 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1382 fixture->source = NULL; in ZTEST_F()
1388 struct bt_bap_broadcast_source_param *create_param = fixture->param; in ZTEST_F()
1395 create_param->params_count, fixture->stream_cnt); in ZTEST_F()
1397 err = bt_bap_broadcast_source_create(create_param, &fixture->source); in ZTEST_F()
1400 err = bt_bap_broadcast_source_get_base(fixture->source, &base_buf); in ZTEST_F()
1403 err = bt_bap_broadcast_source_delete(fixture->source); in ZTEST_F()
1405 fixture->source = NULL; in ZTEST_F()