From 8fb560d818cd0597dcfffd0ee39a6b4a2e6c70d0 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 7 May 2026 15:48:31 -0400 Subject: [PATCH] fix(quic-interop): wait for sim:57832 before launching client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit longrtt failed against aioquic with "Expected at least 2 ClientHellos. Got: 1" because our client started sending Initials before the sim's ns3 + tcpdump capture finished initializing. Only the PTO retransmit hit the wire — the original ClientHello was sent during the sim's ~1s readiness window and never captured. aioquic, picoquic, and quic-go all gate their client launch on /wait-for-it.sh sim:57832. We didn't. Co-Authored-By: Claude Opus 4.7 (1M context) --- quic/interop/run_endpoint.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/quic/interop/run_endpoint.sh b/quic/interop/run_endpoint.sh index 8d19e99fd..4125d901b 100755 --- a/quic/interop/run_endpoint.sh +++ b/quic/interop/run_endpoint.sh @@ -15,6 +15,20 @@ set -e case "${ROLE:-client}" in client) + # Wait for the simulator's readiness port BEFORE first send. + # The sim sets up ns3 + tcpdump capture asynchronously; until + # sim:57832 opens, packets we send are blackholed and never + # show up in the pcap. The longrtt test in particular checks + # for ≥2 ClientHellos in the trace — if our first Initial leaves + # before sim is capturing, only the PTO retransmit lands in the + # pcap and the test fails with "Expected at least 2 ClientHellos". + # aioquic, picoquic, quic-go all gate their client launch on + # this same probe. Skip if the wait helper isn't on PATH so + # off-runner invocations (no sim) keep working. + if [ -x /wait-for-it.sh ]; then + /wait-for-it.sh sim:57832 -s -t 30 || \ + echo "(wait-for-it sim:57832 timed out; continuing anyway)" >&2 + fi exec /opt/quic-interop/bin/quic-interop ;; server)