a73x

5c02dad4

test: refuse bound gets an absolute ceiling

a73x   2026-08-09 12:47

Commit message
test: refuse bound gets an absolute ceiling

test/e2e.sh
Old New
@@ -407,8 +407,15 @@ refuse() {
407 # instead of silently spending headroom a later one would need. The 407 # instead of silently spending headroom a later one would need. The
408 # margin is 2 because a refusal is the complaint plus usage; the 408 # margin is 2 because a refusal is the complaint plus usage; the
409 # smallest Debug panic is ~20 lines, well clear of it. 409 # smallest Debug panic is ~20 lines, well clear of it.
410 # Two bounds, because each misses what the other catches. The relative
411 # one is measured from the no-args usage path, which is NOT one of the
412 # paths it bounds: if usage printing ever ballooned, the bound would
413 # balloon with it and quietly stop catching a panic. The absolute one
414 # cannot drift, and 15 sits above any plausible complaint-plus-usage
415 # and below the ~20 lines of the smallest Debug panic.
410 _usage_lines=$("$MUXD" 2>&1 | wc -l) 416 _usage_lines=$("$MUXD" 2>&1 | wc -l)
411 [ "$(wc -l < "$OUT.q")" -le $((_usage_lines + 2)) ] || { 417 _lines=$(wc -l < "$OUT.q")
418 { [ "$_lines" -le $((_usage_lines + 2)) ] && [ "$_lines" -le 15 ]; } || {
412 echo "e2e FAIL: muxd run $* answered with more than a message:"; cat "$OUT.q"; exit 1; 419 echo "e2e FAIL: muxd run $* answered with more than a message:"; cat "$OUT.q"; exit 1;
413 } 420 }
414 } 421 }