From 6663ac576793738f5ea1d5fb640ac5022af2d7c2 Mon Sep 17 00:00:00 2001 From: Sijie Yang Date: Fri, 24 Nov 2023 17:33:33 +0800 Subject: [PATCH 1/2] Update interop testing - Add .dockerignore - Add lsquic to interop testing matrix - Fix issues found by interop testing --- .dockerignore | 8 ++++++++ .github/workflows/tquic-interop.yml | 8 ++++++-- interop/run_endpoint.sh | 7 ++++++- src/connection/connection.rs | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..72f60644 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +website/ +fuzz/ +include/ +target/ +!target/release/tquic_client +!target/release/tquic_server +.git/ +.github/ diff --git a/.github/workflows/tquic-interop.yml b/.github/workflows/tquic-interop.yml index f084eceb..04055b18 100644 --- a/.github/workflows/tquic-interop.yml +++ b/.github/workflows/tquic-interop.yml @@ -11,9 +11,13 @@ env: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + server: [tquic, lsquic] + client: [tquic, lsquic] + steps: - uses: actions/checkout@v4 with: @@ -37,4 +41,4 @@ jobs: - name: Run the interop tests run: | cd quic-interop-runner - python3 run.py -s tquic -c tquic -t handshake,retry,resumption,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 + python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,retry,resumption,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 diff --git a/interop/run_endpoint.sh b/interop/run_endpoint.sh index e57aeb1c..58869d50 100644 --- a/interop/run_endpoint.sh +++ b/interop/run_endpoint.sh @@ -49,6 +49,7 @@ if [ "$ROLE" == "client" ]; then REQS=($REQUESTS) CLIENT_ARGS="--dump-path ${DOWNLOAD_DIR} --keylog-file $SSLKEYLOGFILE --log-level TRACE --max-concurrent-requests ${#REQS[@]}" + CLIENT_ALPN="--alpn hq-interop" case $TESTCASE in resumption) CLIENT_ARGS="$CLIENT_ARGS --session-file=session.bin" @@ -56,9 +57,13 @@ if [ "$ROLE" == "client" ]; then zerortt) CLIENT_ARGS="$CLIENT_ARGS --session-file=session.bin --enable-early-data" ;; + http3) + CLIENT_ALPN="--alpn h3" + ;; *) ;; esac + CLIENT_ARGS="$CLIENT_ARGS $CLIENT_ALPN" case $TESTCASE in multiconnect|resumption) @@ -76,7 +81,7 @@ if [ "$ROLE" == "client" ]; then ;; esac elif [ "$ROLE" == "server" ]; then - SERVER_ARGS="-c /certs/cert.pem -k /certs/priv.key --listen [::]:443 --root $ROOT_DIR --keylog-file $SSLKEYLOGFILE" + SERVER_ARGS="-c /certs/cert.pem -k /certs/priv.key --listen [::]:443 --root $ROOT_DIR --log-level TRACE --keylog-file $SSLKEYLOGFILE" case $TESTCASE in retry) SERVER_ARGS="$SERVER_ARGS --enable-retry" diff --git a/src/connection/connection.rs b/src/connection/connection.rs index f2da50f3..d7dcce12 100644 --- a/src/connection/connection.rs +++ b/src/connection/connection.rs @@ -1463,7 +1463,7 @@ impl Connection { scid, pkt_num: 0, pkt_num_len, - token: if pkt_type == PacketType::Initial { + token: if !self.is_server && pkt_type == PacketType::Initial { // Note: Retry packet is not sent by send_packet() self.token.clone() } else { From ec573e61cb0bf0d2a121a59f03d18407c34c3993 Mon Sep 17 00:00:00 2001 From: Sijie Yang Date: Fri, 24 Nov 2023 17:42:49 +0800 Subject: [PATCH 2/2] update tquic-interop.yml --- .github/workflows/tquic-interop.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tquic-interop.yml b/.github/workflows/tquic-interop.yml index 04055b18..3d5aab56 100644 --- a/.github/workflows/tquic-interop.yml +++ b/.github/workflows/tquic-interop.yml @@ -15,8 +15,13 @@ jobs: strategy: matrix: - server: [tquic, lsquic] - client: [tquic, lsquic] + server: [tquic] + client: [tquic] + include: + - server: tquic + client: lsquic + - server: lsquic + client: tquic steps: - uses: actions/checkout@v4