chore(quic-interop): trim runner output noise to one line per test
The runner aggregates container stderr verbatim, which gave us a
~50-line block of routing setup, NIC checksum offload toggles,
container lifecycle messages, and the long Command: WAITFORSERVER=...
line for every single testcase. Useful once for triage; pure noise
across a multi-test matrix run.
Two changes:
- run-matrix.sh pipes the runner output through a grep -Ev filter
that drops the boilerplate while keeping outcomes (Test: ... took /
status, the summary table, server's Starting server, sim scenario
+ capture lines, and any Python tracebacks). VERBOSE=1 bypasses
the filter for debugging.
- InteropClient drops its own pre-test header dump unless
QUIC_INTEROP_DEBUG=1 is set; the per-GET success line goes silent
too — failures still print as before.
Net result: a passing test reduces from ~50 noise lines to ~5
meaningful lines (test name, time, status, summary table).
https://claude.ai/code/session_01HcvfQq1ttPV9PkRoJb4nyT
This commit is contained in:
@@ -111,9 +111,35 @@ fi
|
|||||||
# run.py hard-exits if --log-dir already exists, so we use a fresh
|
# run.py hard-exits if --log-dir already exists, so we use a fresh
|
||||||
# per-invocation subdirectory under $LOG_DIR. The parent must exist; the
|
# per-invocation subdirectory under $LOG_DIR. The parent must exist; the
|
||||||
# child must not. Tail of `ls -t "$LOG_DIR" | head -1` finds the latest.
|
# child must not. Tail of `ls -t "$LOG_DIR" | head -1` finds the latest.
|
||||||
|
#
|
||||||
|
# Output filter: by default we drop the runner / container boilerplate
|
||||||
|
# (interface checksum offload toggles, route setup, container lifecycle,
|
||||||
|
# the long Command: WAITFORSERVER=... line, the platform-mismatch warning
|
||||||
|
# that fires once per test on Apple Silicon). Set VERBOSE=1 to bypass.
|
||||||
mkdir -p "$LOG_DIR"
|
mkdir -p "$LOG_DIR"
|
||||||
RUN_LOG_DIR="$LOG_DIR/run-$(date +%Y%m%d-%H%M%S)"
|
RUN_LOG_DIR="$LOG_DIR/run-$(date +%Y%m%d-%H%M%S)"
|
||||||
echo "==> running matrix (args: $* | logs: $RUN_LOG_DIR)"
|
echo "==> running matrix (args: $* | logs: $RUN_LOG_DIR)"
|
||||||
cd "$RUNNER_DIR"
|
cd "$RUNNER_DIR"
|
||||||
exec "$RUNNER_DIR/.venv/bin/python" run.py \
|
|
||||||
-d -i amethyst --log-dir "$RUN_LOG_DIR" "$@"
|
if [ "${VERBOSE:-0}" = "1" ]; then
|
||||||
|
exec "$RUNNER_DIR/.venv/bin/python" run.py \
|
||||||
|
-d -i amethyst --log-dir "$RUN_LOG_DIR" "$@"
|
||||||
|
else
|
||||||
|
"$RUNNER_DIR/.venv/bin/python" run.py \
|
||||||
|
-d -i amethyst --log-dir "$RUN_LOG_DIR" "$@" 2>&1 \
|
||||||
|
| grep -Ev \
|
||||||
|
-e '^(client|server|sim) +\| +(Setting up routes|Actual changes:|tx-[a-z0-9-]+:|Endpoint'\''s IPv[46] address is)' \
|
||||||
|
-e '^ Container [a-z]+ +(Recreate|Recreated|Stopping|Stopped|Starting|Started)( [0-9.]+s)?$' \
|
||||||
|
-e '^ server The requested image'\''s platform' \
|
||||||
|
-e '^Attaching to client, server, sim$' \
|
||||||
|
-e '^Aborting on container exit\.\.\.$' \
|
||||||
|
-e '^(client|server|sim) exited with code [0-9]+$' \
|
||||||
|
-e '^Packets captured: [0-9]+$' \
|
||||||
|
-e '^sim +\| +Packets received/dropped on interface ' \
|
||||||
|
-e '^sim +\| +(Received signal:|msg=|NS_FATAL)' \
|
||||||
|
-e '^Using the client'\''s key log file\.$' \
|
||||||
|
-e '^Command: WAITFORSERVER=' \
|
||||||
|
-e '^==> ' \
|
||||||
|
-e '^$'
|
||||||
|
exit "${PIPESTATUS[0]}"
|
||||||
|
fi
|
||||||
|
|||||||
+10
-7
@@ -72,11 +72,16 @@ fun main() {
|
|||||||
val downloadsDir = File("/downloads")
|
val downloadsDir = File("/downloads")
|
||||||
val keyLogPath = System.getenv("SSLKEYLOGFILE")?.takeIf { it.isNotBlank() }
|
val keyLogPath = System.getenv("SSLKEYLOGFILE")?.takeIf { it.isNotBlank() }
|
||||||
|
|
||||||
System.err.println("== quic-interop client ==")
|
// One-line context header. Verbose per-field dump deferred to debug
|
||||||
System.err.println("testcase: $testcase")
|
// mode (env var QUIC_INTEROP_DEBUG=1) so the runner's aggregated output
|
||||||
System.err.println("requests: $requests")
|
// stays readable across a full matrix run.
|
||||||
System.err.println("downloads dir: ${downloadsDir.absolutePath} (exists=${downloadsDir.isDirectory})")
|
if (System.getenv("QUIC_INTEROP_DEBUG") == "1") {
|
||||||
System.err.println("sslkeylogfile: ${keyLogPath ?: "(unset)"}")
|
System.err.println("== quic-interop client ==")
|
||||||
|
System.err.println("testcase: $testcase")
|
||||||
|
System.err.println("requests: $requests")
|
||||||
|
System.err.println("downloads dir: ${downloadsDir.absolutePath} (exists=${downloadsDir.isDirectory})")
|
||||||
|
System.err.println("sslkeylogfile: ${keyLogPath ?: "(unset)"}")
|
||||||
|
}
|
||||||
|
|
||||||
val cipherSuites =
|
val cipherSuites =
|
||||||
when (testcase) {
|
when (testcase) {
|
||||||
@@ -207,7 +212,6 @@ private fun runTransferTest(
|
|||||||
}
|
}
|
||||||
val name = url.path.substringAfterLast('/').ifBlank { "index" }
|
val name = url.path.substringAfterLast('/').ifBlank { "index" }
|
||||||
File(downloadsDir, name).writeBytes(resp.body)
|
File(downloadsDir, name).writeBytes(resp.body)
|
||||||
System.err.println("GET ${url.path} → ${resp.body.size} bytes")
|
|
||||||
}
|
}
|
||||||
if (anyFailed) "request_failed" else "ok"
|
if (anyFailed) "request_failed" else "ok"
|
||||||
} ?: "transfer_timeout"
|
} ?: "transfer_timeout"
|
||||||
@@ -220,7 +224,6 @@ private fun runTransferTest(
|
|||||||
scope.cancel()
|
scope.cancel()
|
||||||
|
|
||||||
return if (outcome == "ok") {
|
return if (outcome == "ok") {
|
||||||
System.err.println("transfer ok")
|
|
||||||
EXIT_OK
|
EXIT_OK
|
||||||
} else {
|
} else {
|
||||||
System.err.println("transfer $outcome")
|
System.err.println("transfer $outcome")
|
||||||
|
|||||||
Reference in New Issue
Block a user