fix(quic-interop): inspect — '|| true' for greps that may return zero matches
set -euo pipefail kills the script on no-match grep. The run-09:45:21 output.txt has [writer.app] lines but no [batch] / [interop] (those were added in a later commit). The empty subset grep aborted the script silently after printing the section header.
This commit is contained in:
@@ -41,15 +41,19 @@ echo "=============== writer-side debug traces (DEBUG=1 build only) ============
|
||||
WRITER_LINES=$(grep -cE '\[(writer|batch|interop)' "$CASE_DIR/output.txt" 2>/dev/null) || WRITER_LINES=0
|
||||
if [[ "$WRITER_LINES" -gt 0 ]]; then
|
||||
echo "($WRITER_LINES diagnostic lines; [batch] / [interop] entries first then first 30 [writer.app]:)"
|
||||
grep -E '\[(batch|interop)' "$CASE_DIR/output.txt" | head -n 20
|
||||
# Use `|| true` because grep returns 1 on no matches and the
|
||||
# script runs under `set -euo pipefail` — otherwise an empty
|
||||
# [batch]/[interop] subset (run from a build without those logs)
|
||||
# would abort the whole script.
|
||||
grep -E '\[(batch|interop)' "$CASE_DIR/output.txt" | head -n 20 || true
|
||||
echo "..."
|
||||
grep '\[writer' "$CASE_DIR/output.txt" | head -n 30
|
||||
grep '\[writer' "$CASE_DIR/output.txt" | head -n 30 || true
|
||||
echo
|
||||
echo "stream_frames histogram (writer-reported):"
|
||||
grep -oE 'stream_frames=[0-9]+' "$CASE_DIR/output.txt" | sort | uniq -c | sort -rn
|
||||
grep -oE 'stream_frames=[0-9]+' "$CASE_DIR/output.txt" | sort | uniq -c | sort -rn || true
|
||||
echo
|
||||
echo "active histogram (active stream count at drain time):"
|
||||
grep -oE 'active=[0-9]+' "$CASE_DIR/output.txt" | sort | uniq -c | sort -rn
|
||||
grep -oE 'active=[0-9]+' "$CASE_DIR/output.txt" | sort | uniq -c | sort -rn || true
|
||||
else
|
||||
echo "(no diagnostic lines yet — to enable, REBUILD the image with DEBUG=1:"
|
||||
echo " DEBUG=1 ./quic/interop/run-matrix.sh -s aioquic -t multiplexing"
|
||||
|
||||
Reference in New Issue
Block a user