Lines Matching +full:all +full:- +full:inputs
4 * SPDX-License-Identifier: Apache-2.0
39 .option = "use-pull-mode", in test_args_parse()
46 .option = "msg-fail-type", in test_args_parse()
52 .name = "{inactive, start, wait-block, wait-chunk, complete, suspended}", in test_args_parse()
53 .option = "expected-phase", in test_args_parse()
79 partial_block += chunk->size; in blob_chunk_wr()
80 ASSERT_TRUE_MSG(partial_block <= block->size, "Received block is too large\n"); in blob_chunk_wr()
83 if (partial_block == block->size) { in blob_chunk_wr()
85 ASSERT_FALSE_MSG(atomic_test_and_set_bit(block_bitfield, block->number), in blob_chunk_wr()
105 memset(chunk->data, 0, chunk->size); in blob_chunk_rd()
134 struct bt_mesh_blob_cli_inputs inputs; member
147 ASSERT_EQUAL(caps->mtu_size, BT_MESH_RX_SDU_MAX - BT_MESH_MIC_SHORT); in blob_cli_caps()
148 ASSERT_EQUAL(caps->modes, BT_MESH_BLOB_XFER_MODE_ALL); in blob_cli_caps()
149 ASSERT_EQUAL(caps->max_size, CONFIG_BT_MESH_BLOB_SIZE_MAX); in blob_cli_caps()
150 ASSERT_EQUAL(caps->min_block_size_log, BLOB_BLOCK_SIZE_LOG_MIN); in blob_cli_caps()
151 ASSERT_EQUAL(caps->max_block_size_log, BLOB_BLOCK_SIZE_LOG_MAX); in blob_cli_caps()
152 ASSERT_EQUAL(caps->max_chunk_size, BLOB_CHUNK_SIZE_MAX(BT_MESH_RX_SDU_MAX)); in blob_cli_caps()
153 ASSERT_EQUAL(caps->max_chunks, CONFIG_BT_MESH_BLOB_CHUNK_COUNT_MAX); in blob_cli_caps()
163 ASSERT_TRUE(lost_target_find_and_remove(blobt->addr)); in blob_cli_lost_target()
360 blob_cli_xfer.inputs.ttl = BT_MESH_TTL_DEFAULT; in blob_cli_inputs_prepare()
361 blob_cli_xfer.inputs.group = group; in blob_cli_inputs_prepare()
362 blob_cli_xfer.inputs.app_idx = 0; in blob_cli_inputs_prepare()
363 sys_slist_init(&blob_cli_xfer.inputs.targets); in blob_cli_inputs_prepare()
373 sys_slist_append(&blob_cli_xfer.inputs.targets, &blob_cli_xfer.targets[i].n); in blob_cli_inputs_prepare()
386 t->addr = addr; in target_srv_add()
403 err = bt_mesh_blob_cli_caps_get(&blob_cli, &blob_cli_xfer.inputs); in cli_caps_common_procedure()
410 FAIL("Lost targets CB did not trigger for all expected lost targets"); in cli_caps_common_procedure()
426 ASSERT_TRUE(srv1->acked); in test_cli_caps_all_rsp()
427 ASSERT_FALSE(srv1->timedout); in test_cli_caps_all_rsp()
428 ASSERT_TRUE(srv2->acked); in test_cli_caps_all_rsp()
429 ASSERT_FALSE(srv2->timedout); in test_cli_caps_all_rsp()
441 ASSERT_TRUE(srv1->acked); in test_cli_caps_partial_rsp()
442 ASSERT_FALSE(srv1->timedout); in test_cli_caps_partial_rsp()
443 ASSERT_FALSE(srv2->acked); in test_cli_caps_partial_rsp()
444 ASSERT_TRUE(srv2->timedout); in test_cli_caps_partial_rsp()
456 ASSERT_FALSE(srv1->acked); in test_cli_caps_no_rsp()
457 ASSERT_TRUE(srv1->timedout); in test_cli_caps_no_rsp()
458 ASSERT_FALSE(srv2->acked); in test_cli_caps_no_rsp()
459 ASSERT_TRUE(srv2->timedout); in test_cli_caps_no_rsp()
481 err = bt_mesh_blob_cli_caps_get(&blob_cli, &blob_cli_xfer.inputs); in test_cli_caps_cancelled()
500 ASSERT_TRUE(srv1->acked); in test_cli_caps_cancelled()
501 ASSERT_FALSE(srv1->timedout); in test_cli_caps_cancelled()
502 ASSERT_FALSE(srv2->acked); in test_cli_caps_cancelled()
503 ASSERT_FALSE(srv2->timedout); in test_cli_caps_cancelled()
507 err = bt_mesh_blob_cli_caps_get(&blob_cli, &blob_cli_xfer.inputs); in test_cli_caps_cancelled()
517 FAIL("Lost targets CB did not trigger for all expeted lost targets"); in test_cli_caps_cancelled()
520 ASSERT_TRUE(srv1->acked); in test_cli_caps_cancelled()
521 ASSERT_FALSE(srv1->timedout); in test_cli_caps_cancelled()
522 ASSERT_FALSE(srv2->acked); in test_cli_caps_cancelled()
523 ASSERT_TRUE(srv2->timedout); in test_cli_caps_cancelled()
598 blob_cli.inputs = &blob_cli_xfer.inputs; in test_cli_broadcast_basic()
607 ASSERT_FALSE(srv1->acked); in test_cli_broadcast_basic()
608 ASSERT_FALSE(srv2->acked); in test_cli_broadcast_basic()
616 ASSERT_FALSE(srv1->acked); in test_cli_broadcast_basic()
617 ASSERT_FALSE(srv2->acked); in test_cli_broadcast_basic()
627 ASSERT_TRUE(srv1->acked); in test_cli_broadcast_basic()
628 ASSERT_FALSE(srv2->acked); in test_cli_broadcast_basic()
631 /* Run tx complete with response from all targets */ in test_cli_broadcast_basic()
638 ASSERT_TRUE(srv1->acked); in test_cli_broadcast_basic()
639 ASSERT_TRUE(srv2->acked); in test_cli_broadcast_basic()
675 blob_cli.inputs = &blob_cli_xfer.inputs; in test_cli_broadcast_trans()
696 FAIL("Lost targets CB did not trigger for all expected lost targets"); in test_cli_broadcast_trans()
699 ASSERT_TRUE(srv1->timedout); in test_cli_broadcast_trans()
701 /* Re-run with unacked broadcast */ in test_cli_broadcast_trans()
720 ASSERT_FALSE(srv1->timedout); in test_cli_broadcast_trans()
722 /* Re-run with optional flag */ in test_cli_broadcast_trans()
746 ASSERT_FALSE(srv1->timedout); in test_cli_broadcast_trans()
783 blob_cli.inputs = &blob_cli_xfer.inputs; in test_cli_broadcast_unicast_seq()
787 * - Send CB alternates between targets in test_cli_broadcast_unicast_seq()
788 * - Don't retransmit to responded targets in test_cli_broadcast_unicast_seq()
789 * - Next CB is called as soon as all have responded in test_cli_broadcast_unicast_seq()
854 blob_cli.inputs = &blob_cli_xfer.inputs; in test_cli_broadcast_unicast()
857 /** 1. Two non-responsive targets. Checks that: in test_cli_broadcast_unicast()
858 * - Next CB is called after all retransmit attempts expires in test_cli_broadcast_unicast()
859 * - All lost targets is registered in test_cli_broadcast_unicast()
869 FAIL("Lost targets CB did not trigger for all expected lost targets"); in test_cli_broadcast_unicast()
872 /** 2. Two non-responsive targets re-run. Checks that: in test_cli_broadcast_unicast()
873 * - Already lost targets does not attempt new transmission in test_cli_broadcast_unicast()
881 /** 3. Two non-responsive targets (Abort after first attempt). Checks that: in test_cli_broadcast_unicast()
882 * - First transmission calls send CB in test_cli_broadcast_unicast()
883 * - After abort is called, neither send or next CB is called in test_cli_broadcast_unicast()
931 blob_cli_xfer.inputs.timeout_base = 10; in test_cli_trans_complete()
933 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_trans_complete()
966 /* Check that all blocks is received */ in test_srv_trans_complete()
1006 blob_cli_xfer.inputs.timeout_base = 10; in test_cli_trans_resume()
1008 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_trans_resume()
1050 * disruption to cause suspension of the blob srv. Re-enable the radio in test_srv_trans_resume()
1082 /* Check that all blocks is received */ in test_srv_trans_resume()
1107 blob_cli_xfer.inputs.timeout_base = 10; in cli_pull_mode_setup()
1123 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_trans_persistency_pull()
1181 /* Check that all blocks is received */ in test_srv_trans_persistency_pull()
1227 blob_cli_xfer.inputs.timeout_base = 10; in cli_common_fail_on_init()
1238 * - Srv 0x0002 will not respond to Block start msg. in test_cli_fail_on_persistency()
1239 * - Srv 0x0003 will not respond to Block get msg. in test_cli_fail_on_persistency()
1240 * - Srv 0x0004 will not respond to Xfer get msg. in test_cli_fail_on_persistency()
1241 * - Srv 0x0005 is responsive all the way in test_cli_fail_on_persistency()
1242 * - Srv 0x0006 is a non-existing unresponsive node in test_cli_fail_on_persistency()
1252 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_fail_on_persistency()
1265 FAIL("Lost targets CB did not trigger for all expected lost targets"); in test_cli_fail_on_persistency()
1367 /** Test fail conditions upon non-responsive servers in test_cli_fail_on_no_rsp()
1371 * msg_fail_type = BLOCK_GET_FAIL - BLOB transfer suspends in test_cli_fail_on_no_rsp()
1373 * msg_fail_type = XFER_GET_FAIL - BLOB transfer stops in test_cli_fail_on_no_rsp()
1382 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_fail_on_no_rsp()
1409 FAIL("Lost targets CB did not trigger for all expected lost targets"); in test_cli_fail_on_no_rsp()
1429 blob_cli_xfer.inputs.timeout_base = 10; in cli_stop_setup()
1435 blob_cli.inputs = &blob_cli_xfer.inputs; in cli_restore_suspended()
1456 * just self-provision for future steps in test_cli_stop()
1465 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_stop()
1472 FAIL("Suspend targets CB did not trigger for all expected lost targets"); in test_cli_stop()
1481 /* This will time out but gives time for server to process all messages */ in test_cli_stop()
1503 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_stop()
1510 FAIL("Lost targets CB did not trigger for all expected lost targets"); in test_cli_stop()
1528 ASSERT_EQUAL(BT_MESH_RX_SDU_MAX - BT_MESH_MIC_SHORT, blob_srv.state.mtu_size); in srv_check_reboot_and_continue()
1615 err = bt_mesh_blob_cli_send(&blob_cli, &blob_cli_xfer.inputs, in test_cli_friend_pull()
1660 /* Check that all blocks is received */ in test_srv_lpn_pull()
1678 TEST_CASE(cli, caps_all_rsp, "Caps procedure: All responsive targets"),
1683 TEST_CASE(cli, broadcast_trans, "Test all broadcast transmission types"),
1694 TEST_CASE(srv, caps_no_rsp, "Non-responsive blob server"),
1701 TEST_CASE(srv, fail_on_nothing, "Non-failing server"),