Skip to content

Commit

Permalink
Finalize tests and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
huitema committed Nov 25, 2023
1 parent b5984e0 commit b0fb0b8
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else()
endif()

project(picoquic
VERSION 1.1.14.0
VERSION 1.1.15.0
DESCRIPTION "picoquic library"
LANGUAGES C CXX)

Expand Down
6 changes: 3 additions & 3 deletions picoquic/loss_recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,12 @@ static size_t picoquic_retransmit_needed_packet(picoquic_cnx_t* cnx, picoquic_pa
}
if (all_paths_bad) {
/*
* Max retransmission count was exceeded. Disconnect.
* Max retransmission count was exceeded. Log.
*/
DBG_PRINTF("Too many retransmits of packet number %d, disconnect", (int)old_p->sequence_number);
cnx->local_error = PICOQUIC_ERROR_REPEAT_TIMEOUT;
picoquic_connection_disconnect(cnx);
#if 0
length = 0;
#endif
*continue_next = 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion picoquic/picoquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
extern "C" {
#endif

#define PICOQUIC_VERSION "1.1.14.0"
#define PICOQUIC_VERSION "1.1.15.0"
#define PICOQUIC_ERROR_CLASS 0x400
#define PICOQUIC_ERROR_DUPLICATE (PICOQUIC_ERROR_CLASS + 1)
#define PICOQUIC_ERROR_AEAD_CHECK (PICOQUIC_ERROR_CLASS + 3)
Expand Down
20 changes: 19 additions & 1 deletion picoquic/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,25 @@ uint64_t picoquic_current_retransmit_timer(picoquic_cnx_t* cnx, picoquic_path_t
{
uint64_t rto = path_x->retransmit_timer;

rto <<= (path_x->nb_retransmit < 3) ? path_x->nb_retransmit : 2;
if (path_x->nb_retransmit > 0) {
if (path_x->nb_retransmit < 3) {
rto <<= path_x->nb_retransmit;
}
else {
uint64_t n1 = path_x->nb_retransmit - 2;
if (n1 > 18) {
n1 = 18;
}
rto <<= (2 + (n1 / 4));
n1 &= 3;
rto += (n1*rto) >> 2;
}
if (cnx->idle_timeout > 15) {
if (rto > (cnx->idle_timeout >> 4)) {
rto = cnx->idle_timeout >> 4;
}
}
}

if (cnx->cnx_state < picoquic_state_client_ready_start) {
if (PICOQUIC_MICROSEC_HANDSHAKE_MAX / 1000 < cnx->local_parameters.idle_timeout) {
Expand Down
2 changes: 1 addition & 1 deletion picoquictest/edge_cases.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ int ec9a_preemptive_amok_test()
picoquic_cnx_t * last_cnx;
int loop_count = 0;
int send_count = 0;
const int send_count_max = 30;
const int send_count_max = 50;
uint64_t repeat_begin = simulated_time;
uint64_t repeat_duration = 0;

Expand Down
4 changes: 2 additions & 2 deletions picoquictest/multipath_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ int multipath_abandon_test()
*/
int multipath_back1_test()
{
uint64_t max_completion_microsec = 3000000;
uint64_t max_completion_microsec = 3050000;

return multipath_test_one(max_completion_microsec, multipath_test_back1, 0);
}
Expand Down Expand Up @@ -1137,7 +1137,7 @@ int multipath_standby_test()

int multipath_standup_test()
{
uint64_t max_completion_microsec = 4500000;
uint64_t max_completion_microsec = 4750000;

return multipath_test_one(max_completion_microsec, multipath_test_standup, 0);
}
Expand Down
22 changes: 12 additions & 10 deletions picoquictest/tls_api_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3404,6 +3404,7 @@ int immediate_close_test()
ret = tls_api_one_sim_round(test_ctx, &simulated_time, 0, &was_active);
if (test_ctx->cnx_client->cnx_state >= picoquic_state_disconnected) {
/* Client has noticed the disconnect */
ret = 0;
break;
}
}
Expand Down Expand Up @@ -11536,7 +11537,7 @@ int heavy_loss_test_one(int scenario_id, uint64_t completion_target)
int ret;

ret = tls_api_init_ctx_ex(&test_ctx, PICOQUIC_INTERNAL_TEST_VERSION_1,
PICOQUIC_TEST_SNI, PICOQUIC_TEST_ALPN, &simulated_time, NULL, NULL, 0, 0, 0, &initial_cid);
PICOQUIC_TEST_SNI, PICOQUIC_TEST_ALPN, &simulated_time, NULL, NULL, 0, 1, 0, &initial_cid);

if (ret == 0) {
/* Set the CC algorithm to selected value */
Expand All @@ -11556,9 +11557,8 @@ int heavy_loss_test_one(int scenario_id, uint64_t completion_target)
}
}

if (ret == 0 && scenario_id == 2) {
test_ctx->qserver->default_tp.idle_timeout = 60000000;
test_ctx->cnx_client->local_parameters.idle_timeout = 60000000;
if (ret == 0) {
ret = picoquic_start_client_cnx(test_ctx->cnx_client);
}

if (ret == 0) {
Expand All @@ -11582,7 +11582,7 @@ int heavy_loss_test_one(int scenario_id, uint64_t completion_target)
*/
if (ret == 0) {
loss_mask = (scenario_id == 2)?UINT64_MAX:0x13596ac77ca69531ull;
for (int i = 0; ret == 0 && !test_ctx->test_finished && i < 30; i++) {
for (int i = 0; ret == 0 && !test_ctx->test_finished && i < 20; i++) {
ret = tls_api_wait_for_timeout(test_ctx, &simulated_time, 1000000);
}
}
Expand Down Expand Up @@ -11612,17 +11612,17 @@ int heavy_loss_test_one(int scenario_id, uint64_t completion_target)

int heavy_loss_test()
{
return heavy_loss_test_one(0, 33000000);
return heavy_loss_test_one(0, 23000000);
}

int heavy_loss_inter_test()
{
return heavy_loss_test_one(1, 33000000);
return heavy_loss_test_one(1, 21000000);
}

int heavy_loss_total_test()
{
return heavy_loss_test_one(2, 33000000);
return heavy_loss_test_one(2, 25000000);
}


Expand Down Expand Up @@ -11772,7 +11772,7 @@ int excess_repeat_test_one(picoquic_congestion_algorithm_t* cc_algo, int repeat_
int if_index = 0;
picoquic_connection_id_t log_cid;
picoquic_cnx_t* last_cnx;
uint64_t max_disconnected_time = simulated_time + 20000000;
uint64_t max_disconnected_time = simulated_time + 30000000;
int nb_loops = 0;

if (cc_algo->congestion_algorithm_number == PICOQUIC_CC_ALGO_NUMBER_DCUBIC ||
Expand All @@ -11784,7 +11784,9 @@ int excess_repeat_test_one(picoquic_congestion_algorithm_t* cc_algo, int repeat_
ret = -1;
}
else {
while (ret == 0 && test_ctx->cnx_server != NULL &&
while (ret == 0 &&
test_ctx->qserver->current_number_connections > 0 &&
test_ctx->cnx_server != NULL &&
test_ctx->cnx_server->cnx_state != picoquic_state_disconnected) {
uint64_t old_time = simulated_time;
uint64_t delta_t;
Expand Down

0 comments on commit b0fb0b8

Please sign in to comment.