From 5b519001a73d98ac7c1ab49256ac34781994f9e0 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 11 Jun 2026 12:57:49 -0500 Subject: fix(testing): lingering check could never pass — ls output broke the capture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The check captured 'ls path && echo yes', so a present linger file produced 'path\nyes', which never string-equals yes — every run warned regardless of actual state. Forensics on a kept VM showed lingering correctly enabled all along (file present mid-install, loginctl Linger=yes, logind healthy): the original VM-artifact hypothesis was wrong, archsetup's enable-linger calls were always fine. test -e captures cleanly; verified returning 'yes' against the live VM. --- scripts/testing/lib/validation.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/testing/lib/validation.sh b/scripts/testing/lib/validation.sh index f6e7fbf..91270ef 100644 --- a/scripts/testing/lib/validation.sh +++ b/scripts/testing/lib/validation.sh @@ -687,9 +687,12 @@ validate_all_services() { validate_service_optional "cups" "enabled" validate_service_optional "docker" "enabled" validate_service_optional "tailscaled" "enabled" - # Syncthing uses user service (not system), check lingering is enabled + # Syncthing uses user service (not system), check lingering is enabled. + # test -e, not ls: ls prints the path on success, so the old capture held + # "path\nyes" and could never equal "yes" — the check warned on every + # run, even with lingering correctly enabled. step "Checking user lingering for syncthing" - local linger_enabled=$(ssh_cmd "ls /var/lib/systemd/linger/cjennings 2>/dev/null && echo yes || echo no") + local linger_enabled=$(ssh_cmd "test -e /var/lib/systemd/linger/cjennings && echo yes || echo no") if [ "$linger_enabled" = "yes" ]; then validation_pass "User lingering enabled for syncthing user service" else -- cgit v1.2.3