Lines Matching +full:poll +full:- +full:period +full:- +full:ms
4 * SPDX-License-Identifier: Apache-2.0
23 "from across the industry to build a best-in-breed small, scalable, " \
24 "real-time operating system (RTOS) optimized for resource-" \
36 #define THREAD_SLEEP 50 /* ms */
94 zassert_equal(*new_sock, -1, "accept succeed"); in test_accept_timeout()
205 time_diff = k_uptime_get_32() - start_time; in wait_for_n_tcp_contexts()
212 time_diff = k_uptime_get_32() - start_time; in wait_for_n_tcp_contexts()
215 return -ETIMEDOUT; in wait_for_n_tcp_contexts()
330 size_t remain = TEST_LARGE_TRANSFER_SIZE - total_received; in tcp_server_block_thread()
415 size_t remain = TEST_LARGE_TRANSFER_SIZE - total_send; in test_send_recv_large_common()
548 time_diff = k_uptime_get_32() - start_time; in ZTEST()
550 zassert_equal(recved, -1, "Unexpected return code"); in ZTEST()
552 zassert_true(time_diff >= 500, "Expected timeout after 500ms but " in ZTEST()
557 zassert_equal(recved, -1, "Unexpected return code"); in ZTEST()
728 #define SMALL_BUF_LEN (sizeof(TEST_STR_SMALL) - 1 - 2) in ZTEST_USER()
832 zassert_equal(res, -1, "recv() on not connected sock didn't fail"); in _test_recv_enotconn()
838 zassert_equal(res, -1, "recv() on not connected sock didn't fail"); in _test_recv_enotconn()
927 zsock_shutdown(data->fd, data->how); in shutdown_work()
1020 zassert_equal(count_before - 1, count_after, in ZTEST()
1022 count_before - 1, count_after); in ZTEST()
1052 -1, "connect succeed"); in ZTEST()
1099 zassert_equal(rv, -1, "connect should not succeed"); in ZTEST()
1107 zassert_equal(poll_rc, 1, "poll should return 1, got %i", poll_rc); in ZTEST()
1109 "poll should set error event"); in ZTEST()
1138 -1, in ZTEST()
1147 zassert_equal(poll_rc, 1, "poll should return 1, got %i", poll_rc); in ZTEST()
1149 "poll should set POLLOUT"); in ZTEST()
1202 wait_for_n_tcp_contexts(count_before-1, K_MSEC(TCP_CLOSE_FAILURE_TIMEOUT)); in ZTEST()
1206 zassert_equal(count_before - 1, count_after, in ZTEST()
1208 count_before - 1, count_after); in ZTEST()
1211 int dropped_packets = dropped_packets_after - dropped_packets_before; in ZTEST()
1254 zassert_true(k_uptime_get_32() - tstamp <= 100, ""); in ZTEST_USER()
1347 optval = -1; in ZTEST()
1349 zassert_equal(rv, -1, "setsockopt failed (%d)", rv); in ZTEST()
1353 zassert_equal(rv, -1, "setsockopt failed (%d)", rv); in ZTEST()
1385 /* Lower server-side RX window size. */ in ZTEST()
1393 /* Window should've dropped to 0, so the ACK will be delayed - wait for in ZTEST()
1400 zassert_equal(rv, -1, "Unexpected return code %d", rv); in ZTEST()
1436 optval = -1; in ZTEST()
1438 zassert_equal(rv, -1, "setsockopt failed (%d)", rv); in ZTEST()
1442 zassert_equal(rv, -1, "setsockopt failed (%d)", rv); in ZTEST()
1466 /* Lower client-side TX window size. */ in ZTEST()
1487 zassert_equal(rv, -1, "Unexpected return code %d", rv); in ZTEST()
1541 time_diff = k_uptime_get_32() - start_time; in ZTEST()
1543 zassert_equal(recved, -1, "Unexpected return code"); in ZTEST()
1545 zassert_true(time_diff >= 2500, "Expected timeout after 2500ms but " in ZTEST()
1550 time_diff = k_uptime_get_32() - start_time; in ZTEST()
1552 zassert_equal(recved, -1, "Unexpected return code"); in ZTEST()
1554 zassert_true(time_diff >= 2000, "Expected timeout after 2000ms but " in ZTEST()
1608 time_diff = k_uptime_get_32() - start_time; in ZTEST()
1610 zassert_equal(recved, -1, "Unexpected return code"); in ZTEST()
1612 zassert_true(time_diff >= 2500, "Expected timeout after 2500ms but " in ZTEST()
1617 time_diff = k_uptime_get_32() - start_time; in ZTEST()
1619 zassert_equal(recved, -1, "Unexpected return code"); in ZTEST()
1621 zassert_true(time_diff >= 2000, "Expected timeout after 2000ms but " in ZTEST()
1680 time_diff = k_uptime_get_32() - start_time; in ZTEST()
1682 zassert_equal(rv, -1, "Unexpected return code %d", rv); in ZTEST()
1684 zassert_true(time_diff >= 200, "Expected timeout after 200ms but " in ZTEST()
1741 time_diff = k_uptime_get_32() - start_time; in ZTEST()
1743 zassert_equal(rv, -1, "Unexpected return code %d", rv); in ZTEST()
1745 zassert_true(time_diff >= 500, "Expected timeout after 500ms but " in ZTEST()
1769 if (test_data->retries > 0) { in test_msg_waitall_tx_work_handler()
1770 test_send(test_data->sock, test_data->data + test_data->offset, 1, 0); in test_msg_waitall_tx_work_handler()
1771 test_data->offset++; in test_msg_waitall_tx_work_handler()
1772 test_data->retries--; in test_msg_waitall_tx_work_handler()
1773 k_work_reschedule(&test_data->tx_work, K_MSEC(10)); in test_msg_waitall_tx_work_handler()
1790 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
1808 /* Regular MSG_WAITALL - make sure recv returns only after in ZTEST()
1824 /* MSG_WAITALL + SO_RCVTIMEO - make sure recv returns the amount of data in ZTEST()
1833 test_data.retries = sizeof(rx_buf) - 1; in ZTEST()
1839 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf) - 1, ZSOCK_MSG_WAITALL); in ZTEST()
1843 zassert_equal(ret, sizeof(rx_buf) - 1, "Invalid length received"); in ZTEST()
1844 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(rx_buf) - 1, in ZTEST()
1868 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
1885 /* Regular MSG_WAITALL - make sure recv returns only after in ZTEST()
1901 /* MSG_WAITALL + SO_RCVTIMEO - make sure recv returns the amount of data in ZTEST()
1910 test_data.retries = sizeof(rx_buf) - 1; in ZTEST()
1916 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf) - 1, ZSOCK_MSG_WAITALL); in ZTEST()
1917 zassert_equal(ret, sizeof(rx_buf) - 1, "Invalid length received"); in ZTEST()
1918 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(rx_buf) - 1, in ZTEST()
1997 K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1)); in setup()
2015 zsock_close(data->fd); in close_work()
2053 zassert_equal(ret, -1, "recv did not return error"); in ZTEST()
2088 zassert_equal(new_sock, -1, "accept did not return error"); in ZTEST()
2112 fd[0] = -1; in test_ioctl_fionread_setup()
2113 fd[1] = -1; in test_ioctl_fionread_setup()
2114 fd[2] = -1; in test_ioctl_fionread_setup()
2156 int fd[] = {-1, -1, -1}; in test_ioctl_fionread_common()
2230 zassert_equal(ret, -1, "connect succeed, %d", errno); in ZTEST()
2273 * make sure poll() returns proper error for the closed
2299 zassert_equal(ret, -1, "connect succeed, %d", errno); in ZTEST()
2322 zassert_true(closed, "poll failed, %d", errno); in ZTEST()
2346 /* Keep-alive should be disabled by default. */ in ZTEST()
2352 /* Enable keep-alive. */ in ZTEST()
2363 /* Check keep-alive parameters defaults. */ in ZTEST()
2382 /* Check keep-alive parameters update. */ in ZTEST()
2429 /* Enable keep-alive on both ends and set timeouts/retries to minimum */ in ZTEST()
2468 /* Kill communication - expect that connection will be closed after in ZTEST()
2469 * a timeout period. in ZTEST()
2474 zassert_equal(ret, -1, "recv() should've failed"); in ZTEST()
2479 zassert_equal(ret, -1, "recv() should've failed"); in ZTEST()