Lines Matching +full:max +full:- +full:current +full:- +full:300
4 * SPDX-License-Identifier: Apache-2.0
141 zassert_equal_ptr(payload_start, cpkt.data + cpkt.offset - payload_len, in ZTEST()
234 int r, count = ARRAY_SIZE(options) - 1; in ZTEST()
250 zassert_equal_ptr(payload_start, cpkt.data + cpkt.offset - payload_len, in ZTEST()
297 zassert_equal(r, -EINVAL, "Should've failed to parse a packet"); in ZTEST()
300 zassert_equal(r, -EINVAL, "Should've failed to parse a packet"); in ZTEST()
304 zassert_equal(r, -EINVAL, "Should've failed to parse a packet"); in ZTEST()
317 zassert_equal(r, -EBADMSG, "Should've failed to parse a packet"); in ZTEST()
331 zassert_equal(r, -EILSEQ, "Should've failed to parse a packet"); in ZTEST()
345 zassert_equal(r, -EILSEQ, "Should've failed to parse a packet"); in ZTEST()
359 zassert_equal(r, -EILSEQ, "Should've failed to parse a packet"); in ZTEST()
373 zassert_equal(r, -EILSEQ, "Should've failed to parse a packet"); in ZTEST()
502 if (req_ctx->total_size == 0) { in prepare_block1_request()
527 payload_len = req_ctx->total_size - req_ctx->current; in prepare_block1_request()
548 if (rsp_ctx->total_size == 0) { in prepare_block1_response()
576 zassert_equal(req_ctx->block_size, COAP_BLOCK_32, in verify_block1_request()
579 /* In last iteration "current" must match "total_size" */ in verify_block1_request()
582 req_ctx->current, block_size * iter, in verify_block1_request()
583 "req:%d,Couldn't get the current block position", iter); in verify_block1_request()
586 req_ctx->current, req_ctx->total_size, in verify_block1_request()
587 "req:%d,Couldn't get the current block position", iter); in verify_block1_request()
590 zassert_equal(req_ctx->total_size, BLOCK_WISE_TRANSFER_SIZE_GET, in verify_block1_request()
597 zassert_equal(rsp_ctx->block_size, COAP_BLOCK_32, in verify_block1_response()
599 zassert_equal(rsp_ctx->current, in verify_block1_response()
600 coap_block_size_to_bytes(COAP_BLOCK_32) * (iter - 1U), in verify_block1_response()
601 "rsp:%d, Couldn't get the current block position", iter); in verify_block1_response()
602 zassert_equal(rsp_ctx->total_size, BLOCK_WISE_TRANSFER_SIZE_GET, in verify_block1_response()
631 #define BLOCK2_WISE_TRANSFER_SIZE_GET 300
642 if (req_ctx->total_size == 0) { in prepare_block2_request()
674 if (rsp_ctx->total_size == 0) { in prepare_block2_response()
701 payload_len = rsp_ctx->total_size - rsp_ctx->current; in prepare_block2_response()
715 zassert_equal(req_ctx->block_size, COAP_BLOCK_64, in verify_block2_request()
717 zassert_equal(req_ctx->current, in verify_block2_request()
718 coap_block_size_to_bytes(COAP_BLOCK_64) * (iter - 1U), in verify_block2_request()
719 "req:%d, Couldn't get the current block position", iter); in verify_block2_request()
720 zassert_equal(req_ctx->total_size, BLOCK2_WISE_TRANSFER_SIZE_GET, in verify_block2_request()
730 zassert_equal(rsp_ctx->block_size, COAP_BLOCK_64, in verify_block2_response()
733 /* In last iteration "current" must match "total_size" */ in verify_block2_response()
736 rsp_ctx->current, block_size * iter, in verify_block2_response()
737 "req:%d,Couldn't get the current block position", iter); in verify_block2_response()
740 rsp_ctx->current, rsp_ctx->total_size, in verify_block2_response()
741 "req:%d,Current block position does not match total size", iter); in verify_block2_response()
744 zassert_equal(rsp_ctx->total_size, BLOCK2_WISE_TRANSFER_SIZE_GET, in verify_block2_response()
823 if (a->sa_family != b->sa_family) { in ipaddr_cmp()
827 if (a->sa_family == AF_INET6) { in ipaddr_cmp()
828 return net_ipv6_addr_cmp(&net_sin6(a)->sin6_addr, in ipaddr_cmp()
829 &net_sin6(b)->sin6_addr); in ipaddr_cmp()
830 } else if (a->sa_family == AF_INET) { in ipaddr_cmp()
831 return net_ipv4_addr_cmp(&net_sin(a)->sin_addr, in ipaddr_cmp()
832 &net_sin(b)->sin_addr); in ipaddr_cmp()
843 r = ipaddr_cmp(&observer->addr, (const struct sockaddr *)&dummy_addr); in server_resource_1_callback()
853 r = ipaddr_cmp(&observer->addr, (const struct sockaddr *)&dummy_addr); in server_resource_2_callback()
888 resource->age); in server_resource_1_get()
898 resource->user_data = data; in server_resource_1_get()
920 uint8_t opt_num = ARRAY_SIZE(options) - 1; in ZTEST()
947 zassert_equal(r, -ENOENT, in ZTEST()
970 uint8_t opt_num = ARRAY_SIZE(options) - 1; in ZTEST()
994 reply->reply = resource_reply_cb; in ZTEST()
1044 zassert_equal(r, -ENOTSUP, "Request handling should fail with -ENOTSUP"); in ZTEST()
1758 "Wrong max retransmission value"); in ZTEST()
1786 zassert_equal(pending->params.ack_timeout, 3000, "Wrong ACK timeout"); in ZTEST()
1787 zassert_equal(pending->params.ack_random_percent, 130, "Wrong ACK random percent"); in ZTEST()
1788 zassert_equal(pending->params.coap_backoff_percent, 250, "Wrong backoff percent"); in ZTEST()
1789 zassert_equal(pending->params.max_retransmission, 3, "Wrong max retransmission value"); in ZTEST()
1795 zassert_equal(pending->params.ack_timeout, 1000, "Wrong ACK timeout"); in ZTEST()
1796 zassert_equal(pending->params.ack_random_percent, 110, "Wrong ACK random percent"); in ZTEST()
1797 zassert_equal(pending->params.coap_backoff_percent, 150, "Wrong backoff percent"); in ZTEST()
1798 zassert_equal(pending->params.max_retransmission, 2, "Wrong max retransmission value"); in ZTEST()
1811 uint8_t opt_num = ARRAY_SIZE(options) - 1; in ZTEST()
1827 resource->age = COAP_OBSERVE_MAX_AGE - 10; in ZTEST()
1829 last_age = resource->age; in ZTEST()
1833 zassert_true(coap_age_is_newer(last_age, resource->age), in ZTEST()
1835 last_age = resource->age; in ZTEST()
1839 CONTAINER_OF(sys_slist_peek_head(&resource->observers), struct coap_observer, list); in ZTEST()
1855 "Max age should be marked as newer"); in ZTEST()