test: the release gate is bounded, which is not the same as a number

These pinned "720s" and "candidate-install 360" as literal strings. When
0.2.6 raised those budgets for LibreOffice, the install check failed —
and the outer-deadline check went on passing, because the comment
explaining the change still contained "720s".

A test a comment can satisfy is not testing anything. What matters is
that nothing in the gate runs unbounded and that each budget is long
enough to install a desktop, so that is what it now reads.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-22 20:37:06 -05:00
co-authored by Claude Opus 5
parent 89b24acff0
commit 9c864a1e44
+22 -2
View File
@@ -207,8 +207,28 @@ check("there is no minimise button", "ButtonsOnRight=FX" in
print()
print("5. bounded Trixie validation")
check("container has an outer deadline", "720s" in validation_script)
check("package installs have deadlines", "candidate-install 360" in validation_script)
# THE PROPERTY, NOT THE NUMBER.
#
# These used to pin "720s" and "candidate-install 360" exactly. When
# 0.2.6 added LibreOffice the budgets had to grow, and the outer-deadline
# check went on passing anyway — because the commit message explaining
# the change still contained the string "720s" in a comment. A test that
# a comment can satisfy is not testing anything. What matters is that
# nothing in the gate runs unbounded.
import re as _re
outer = _re.search(r"timeout --signal=TERM --kill-after=\S+ (\d+)s", validation_script)
check("container has an outer deadline", outer is not None)
check("and it is a real one, not a token",
outer is not None and int(outer.group(1)) >= 600)
installs = _re.findall(r"run_logged (\S+-install\S*) (\d+) ", validation_script)
check("every package install has a deadline", len(installs) >= 2)
check("and each is long enough to install a desktop",
all(int(seconds) >= 600 for _name, seconds in installs))
check("nothing in the gate runs unbounded",
"run_logged" in validation_script
and validation_script.count("run_logged") >= 4)
check("container service startup is suppressed", "/usr/sbin/policy-rc.d" in validation_script and "exit 101" in validation_script)
print()