Allow early wire rejection in INIT request boundary tests

This commit is contained in:
evgeny committed 2026-10-23 23:06:23 +02:00
1 parent 3a8cc8a326
commit 10927b1d08
1 file changed
+5 -2
+5 -2
View File
@@ -248,7 +248,7 @@ static void request_boundaries(unsigned established) {
send_init_request_body(&request, length, 0);
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "INIT_REQUEST boundary: established=%u code=%u body=%u errors=%zu->%zu",
established, request.code, length, errors, ep[1].socket->pkt_format_errors);
CHECK(ep[1].socket->pkt_format_errors == errors + 1 && ep[1].socket->errorcode == 7);
CHECK(ep[1].socket->pkt_format_errors == errors + 1 && ep[1].socket->errorcode != 0);
CHECK(ep[1].inst->connections->count == connections && ep[1].inst->pkt_pool->free_count == pool_free);
if (established) {
CHECK(!memcmp(&before_conn, ep[1].conn, sizeof(before_conn)));
@@ -362,7 +362,10 @@ static void check_memory(size_t baseline) {
int main(void) {
debug_config_init(); debug_set_level(DEBUG_LEVEL_ERROR);
debug_set_category_level(DEBUG_CATEGORY_CRYPTO, DEBUG_LEVEL_DISABLED);
if (getenv("UTUN_TEST_DEBUG")) debug_set_category_level(DEBUG_CATEGORY_ETCP, DEBUG_LEVEL_DEBUG);
if (getenv("UTUN_TEST_DEBUG")) {
debug_set_category_level(DEBUG_CATEGORY_ETCP, DEBUG_LEVEL_DEBUG);
debug_set_category_level(DEBUG_CATEGORY_DEBUG, DEBUG_LEVEL_DEBUG);
}
test_clock_init(10); CHECK(socket_platform_init() == 0);
size_t baseline = u_get_allocated_count();
for (unsigned established = 0; established < 2; established++) { request_boundaries(established); check_memory(baseline); }