diff --git a/tests/test-deployment-support.sh b/tests/test-deployment-support.sh index 5796b2a..8d8c74c 100755 --- a/tests/test-deployment-support.sh +++ b/tests/test-deployment-support.sh @@ -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()