mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 4.0.0
This commit is contained in:
parent
b373fe5220
commit
79880b469a
47 changed files with 2459 additions and 606 deletions
|
@ -179,7 +179,7 @@ run_test (const struct test *test)
|
|||
size_t sz;
|
||||
unsigned char buf[0x1000];
|
||||
|
||||
pf = select_pf_by_ver(LSQVER_ID27);
|
||||
pf = select_pf_by_ver(LSQVER_I001);
|
||||
if (!test->skip_gen)
|
||||
{
|
||||
rechist.acki = &test->acki;
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
static struct lsquic_conn lconn = LSCONN_INITIALIZER_CIDLEN(lconn, 0);
|
||||
|
||||
//static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_ID27); // will not work on MSVC
|
||||
#define pf ((const struct parse_funcs *const)select_pf_by_ver(LSQVER_ID27))
|
||||
//static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_I001); // will not work on MSVC
|
||||
#define pf ((const struct parse_funcs *const)select_pf_by_ver(LSQVER_I001))
|
||||
|
||||
|
||||
static void
|
||||
|
|
|
@ -103,7 +103,7 @@ main (void)
|
|||
const struct test tests[] = {
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.offset = 0,
|
||||
.data_sz = 10,
|
||||
.data = "0123456789",
|
||||
|
@ -119,7 +119,7 @@ main (void)
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.offset = 500,
|
||||
.data_sz = 10,
|
||||
.data = "0123456789",
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static const struct parse_funcs *g_pf = select_pf_by_ver(LSQVER_ID27);
|
||||
static const struct parse_funcs *g_pf = select_pf_by_ver(LSQVER_I001);
|
||||
|
||||
struct test_ctl_settings
|
||||
{
|
||||
|
@ -343,7 +343,7 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
memset(tobjs, 0, sizeof(*tobjs));
|
||||
LSCONN_INITIALIZE(&tobjs->lconn);
|
||||
tobjs->lconn.cn_pf = g_pf;
|
||||
tobjs->lconn.cn_version = LSQVER_ID27;
|
||||
tobjs->lconn.cn_version = LSQVER_I001;
|
||||
tobjs->lconn.cn_esf_c = &lsquic_enc_session_common_ietf_v1;
|
||||
network_path.np_pack_size = packet_sz;
|
||||
tobjs->lconn.cn_if = &our_conn_if;
|
||||
|
|
|
@ -214,7 +214,7 @@ new_packet (struct test_ctx *ctx)
|
|||
*/
|
||||
|
||||
packet_out = lsquic_packet_out_new(&ctx->enpub.enp_mm, ctx->enpub.enp_mm.malo.packet_out, 1,
|
||||
&ctx->lconn, PACKNO_BITS_0, 0, NULL, &ctx->path, HETY_NOT_SET);
|
||||
&ctx->lconn, PACKNO_BITS_0, 0, NULL, &ctx->path, HETY_SHORT);
|
||||
if (packet_out)
|
||||
packet_out->po_packno = packno++;
|
||||
|
||||
|
|
|
@ -185,8 +185,8 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
int s;
|
||||
memset(tobjs, 0, sizeof(*tobjs));
|
||||
LSCONN_INITIALIZE(&tobjs->lconn);
|
||||
tobjs->lconn.cn_pf = select_pf_by_ver(LSQVER_ID27);
|
||||
tobjs->lconn.cn_version = LSQVER_ID27;
|
||||
tobjs->lconn.cn_pf = select_pf_by_ver(LSQVER_I001);
|
||||
tobjs->lconn.cn_version = LSQVER_I001;
|
||||
tobjs->lconn.cn_esf_c = &lsquic_enc_session_common_ietf_v1;
|
||||
network_path.np_pack_size = IQUIC_MAX_IPv4_PACKET_SZ;
|
||||
tobjs->lconn.cn_if = &our_conn_if;
|
||||
|
|
|
@ -363,7 +363,7 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
LSCONN_INITIALIZE(&tobjs->lconn);
|
||||
tobjs->lconn.cn_pf = pf ? pf : g_pf;
|
||||
tobjs->lconn.cn_version = tobjs->lconn.cn_pf == &lsquic_parse_funcs_ietf_v1 ?
|
||||
LSQVER_ID27 : LSQVER_043;
|
||||
LSQVER_I001 : LSQVER_043;
|
||||
tobjs->lconn.cn_esf_c = &lsquic_enc_session_common_gquic_1;
|
||||
network_path.np_pack_size = 1370;
|
||||
tobjs->lconn.cn_if = &our_conn_if;
|
||||
|
@ -1620,7 +1620,7 @@ test_termination (void)
|
|||
{
|
||||
init_test_ctl_settings(&g_ctl_settings);
|
||||
g_ctl_settings.tcs_schedule_stream_packets_immediately = 1;
|
||||
init_test_objs(&tobjs, 0x4000, 0x4000, select_pf_by_ver(LSQVER_ID27));
|
||||
init_test_objs(&tobjs, 0x4000, 0x4000, select_pf_by_ver(LSQVER_I001));
|
||||
tf->func(&tobjs);
|
||||
deinit_test_objs(&tobjs);
|
||||
}
|
||||
|
@ -2619,7 +2619,7 @@ test_changing_pack_size (void)
|
|||
enum lsquic_version versions_to_test[3] =
|
||||
{
|
||||
LSQVER_046,
|
||||
LSQVER_ID27,
|
||||
LSQVER_I001,
|
||||
};
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
|
@ -3005,7 +3005,7 @@ test_resize_buffered (void)
|
|||
ssize_t nw;
|
||||
struct test_objs tobjs;
|
||||
struct lsquic_stream *streams[1];
|
||||
const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_ID27);
|
||||
const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_I001);
|
||||
char buf[0x10000];
|
||||
unsigned char buf_out[0x10000];
|
||||
int s, fin;
|
||||
|
@ -3068,7 +3068,7 @@ test_resize_scheduled (void)
|
|||
ssize_t nw;
|
||||
struct test_objs tobjs;
|
||||
struct lsquic_stream *streams[1];
|
||||
const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_ID27);
|
||||
const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_I001);
|
||||
char buf[0x10000];
|
||||
unsigned char buf_out[0x10000];
|
||||
int s, fin;
|
||||
|
@ -3260,8 +3260,8 @@ test_packetization (int schedule_stream_packets_immediately, int dispatch_once,
|
|||
|
||||
if (g_use_crypto_ctor)
|
||||
{
|
||||
stream_ids[0] = ENC_LEV_CLEAR;
|
||||
stream_ids[1] = ENC_LEV_INIT;
|
||||
stream_ids[0] = ENC_LEV_INIT;
|
||||
stream_ids[1] = ENC_LEV_HSK;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3754,7 +3754,7 @@ main (int argc, char **argv)
|
|||
|
||||
/* Redo some tests using crypto streams and frames */
|
||||
g_use_crypto_ctor = 1;
|
||||
g_pf = select_pf_by_ver(LSQVER_ID27);
|
||||
g_pf = select_pf_by_ver(LSQVER_I001);
|
||||
main_test_packetization();
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -371,7 +371,7 @@ main (void)
|
|||
*/
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.fin = { 0, 1, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
@ -391,7 +391,7 @@ main (void)
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.fin = { 0, 0, },
|
||||
.offset = 0,
|
||||
.stream_id = 0x210,
|
||||
|
@ -410,7 +410,7 @@ main (void)
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.fin = { 0, 0, },
|
||||
.offset = 0,
|
||||
.stream_id = 0x21,
|
||||
|
@ -428,7 +428,7 @@ main (void)
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.fin = { 0, 0, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
@ -448,7 +448,7 @@ main (void)
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.fin = { 1, 0, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
@ -466,7 +466,7 @@ main (void)
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.pf = select_pf_by_ver(LSQVER_I001),
|
||||
.fin = { 1, 0, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
|
|
@ -274,7 +274,7 @@ main (void)
|
|||
|
||||
{ "Balls to the wall: every possible bit is set",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x41, 0x23, /* Stream ID */
|
||||
|
@ -293,7 +293,7 @@ main (void)
|
|||
|
||||
{ "Balls to the wall #2: every possible bit is set except FIN",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -312,7 +312,7 @@ main (void)
|
|||
|
||||
{ "Data length is zero",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 0<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -330,7 +330,7 @@ main (void)
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #1",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -349,7 +349,7 @@ main (void)
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #2",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -368,7 +368,7 @@ main (void)
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #3",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 0<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -386,7 +386,7 @@ main (void)
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #3",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -405,7 +405,7 @@ main (void)
|
|||
|
||||
{ "Check data bounds #1",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -424,7 +424,7 @@ main (void)
|
|||
|
||||
{ "Check data bounds #2",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
select_pf_by_ver(LSQVER_I001),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue