diff --git a/nix/vm-tests/full-setup.nix b/nix/vm-tests/full-setup.nix index 5721387af..ec3a2677c 100644 --- a/nix/vm-tests/full-setup.nix +++ b/nix/vm-tests/full-setup.nix @@ -206,14 +206,13 @@ pkgs.testers.runNixOSTest ( ) def diagnose(unit=None, container=None): - # What a timed-out wait leaves behind: the failed units, and the status - # and the end of the journal of the unit that was waited on. + # What a timed-out wait leaves behind: the failed units and the end of the + # journal of the units that were waited on. where = f"--machine={container} " if container else "" units = [unit] if isinstance(unit, str) else list(unit or []) flags = " ".join(f"-u '{u}'" for u in units) for command in [ f"systemctl {where}--failed --no-legend --no-pager", - *([f"systemctl {where}status --no-pager -n 0 -l {' '.join(units)} | head -c 4000"] if units else []), *([f"journalctl {where}{flags} --no-pager -n 50 | tail -c 6000"] if units else []), ]: print(f"--- {command}")