litespeed-quic/tests/test_senhist.c
Dmitri Tikhonov 8ae5ecb45e Release 2.16.1
- [FEATURE] Use "no-progress timeout" after which connection is closed.
- [BUGFIX] Select new SCID when current SCID is retired.
- [BUGFIX] Don't warn about dropped Initial packet sequence gaps during
  mini/full handoff.
- [BUGFIX] Send correct conn error when HTTP/3 frame is truncated.
- [BUGFIX] Mini conn: consider amplification when deciding to return
  TICK_SEND.
- [BUGFIX] Don't double-count tag length in amplification logic.
- [BUGFIX] Don't squeeze out lone path challenges.
- [BUGFIX] Log messages dealing with scheduled packet queue squeezing.
- [BUGFIX] don't wipe current path if no path challenge responses
  come back.
- [BUGFIX] When path is reset, don't lose path_id which is used for
  logging.
- Downgrade flow control violations to info log level from warnings.
- Fix connection cap extra check, avoid checks in nested calls.
- Fix some unit tests when extra checks are enabled.
- Use ls-hpack 2.2.1.
- Turn off unconditional extra checks for IETF clients.
- Extra checks: don't verify sent size of hello packets.  Client
  changes DCID length and this check will fail.
2020-06-09 12:01:45 -04:00

36 lines
712 B
C

/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "lsquic_int_types.h"
#include "lsquic_senhist.h"
#include "lsquic_types.h"
#include "lsquic_logger.h"
int
main (void)
{
struct lsquic_senhist hist = { 0, 0
#if !LSQUIC_SENHIST_FATAL
, 0
#endif
};
lsquic_packno_t packno;
lsquic_senhist_init(&hist, 0);
assert(0 == lsquic_senhist_largest(&hist));
for (packno = 1; packno < 100; ++packno)
lsquic_senhist_add(&hist, packno);
assert(99 == lsquic_senhist_largest(&hist));
lsquic_senhist_cleanup(&hist);
return 0;
}