From b0737f865573fa337d0bbc2632ff4cef8892a0bd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 7 May 2026 14:35:34 +0000 Subject: [PATCH] diag(quic-interop): summarize falls back to qlog inspection when no status line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some runner versions don't write 'Test: X took Y, status:' lines into the per-testcase output.txt — they only print to the runner's own stdout (which our run-matrix.sh consumes via grep filter and loses). Without status lines we can still infer outcomes from artifacts: - qlog has a connection_closed event with a reason → FAILED with that reason (e.g. peer CLOSE 'no CRYPTO frame') - qlog has packets received but no close → ran something, status genuinely uncertain - no qlog → connection probably never made it past TLS Tagged [inf] so users can distinguish runner-reported status from inferred status. --- quic/interop/summarize-matrix.sh | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/quic/interop/summarize-matrix.sh b/quic/interop/summarize-matrix.sh index 12f3e3c2f..22be16656 100755 --- a/quic/interop/summarize-matrix.sh +++ b/quic/interop/summarize-matrix.sh @@ -29,6 +29,37 @@ if [[ -z "$PAIR_DIR" ]]; then exit 1 fi +# Some runner versions don't write status to per-testcase output.txt. +# Fall back to inferring from artifacts (qlog connection_closed events, +# pcap presence, etc.). We tag these with [inf] in the result column. +infer_status_from_artifacts() { + local tc_dir="$1" + local tc="$2" + # Did the connection formally close with an error? + local qlog + qlog=$(ls -1 "$tc_dir"/client/qlog/*.sqlog "$tc_dir"/client/qlog/*.qlog 2>/dev/null | head -n 1 || true) + if [[ -n "$qlog" ]]; then + # Did the server close us with an error code? + local cc + cc=$(grep '"name":"transport:connection_closed"' "$qlog" 2>/dev/null | tail -n 1) + if [[ -n "$cc" ]]; then + local reason + reason=$(echo "$cc" | sed -nE 's/.*"reason":"([^"]+)".*/\1/p') + echo "FAILED: $reason" + return + fi + # No close → did we get >0 packets received? If so, infer + # something happened. Status is genuinely uncertain. + local rx + rx=$(grep -c '"name":"transport:packet_received"' "$qlog" 2>/dev/null || echo 0) + if [[ "$rx" -gt 0 ]]; then + echo "RAN ($rx pkts rx; no formal close)" + return + fi + fi + echo "UNKNOWN (no qlog)" +} + # The "Test: X took Y, status: TestResult.Z" line is written by run.py # to its own stdout, not into the per-testcase output.txt. Search a few # likely locations: the per-testcase output.txt (in case the runner @@ -68,6 +99,8 @@ for tc_dir in "$PAIR_DIR"/*/; do esac printf "%-22s %s %-13s %-10s\n" "$tc" "$marker" "$status" "$time" else - printf "%-22s %s %s\n" "$tc" "·" "(no status line found in $(printf '%s ' "${SEARCH_FILES[@]##*/}" | head -c 60))" + # Fall back to artifact inspection. + inferred=$(infer_status_from_artifacts "$tc_dir" "$tc") + printf "%-22s %s [inf] %s\n" "$tc" "·" "$inferred" fi done