From a21f2007a11000b578596057048616a50ed0431e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 20 Jan 2026 06:52:36 -0600 Subject: feat(testing): add bare metal ZFS test script + fix scrub timer check Add run-test-baremetal.sh for testing on physical ZFS systems: - SSH to target host and run archsetup - Support for ZFS genesis snapshot rollback - Validate-only mode for existing installs - Same validation checks as VM tests Fix grep -c multi-line output issue in ZFS scrub timer check. Co-Authored-By: Claude Opus 4.5 --- scripts/testing/lib/validation.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/testing/lib/validation.sh') diff --git a/scripts/testing/lib/validation.sh b/scripts/testing/lib/validation.sh index 1ed84d9..a2e375c 100644 --- a/scripts/testing/lib/validation.sh +++ b/scripts/testing/lib/validation.sh @@ -611,7 +611,9 @@ validate_zfs_services() { validate_service_optional "sanoid.timer" "enabled" # Check for zfs-scrub timer (pool name varies) - local scrub_enabled=$(ssh_cmd "systemctl list-unit-files 'zfs-scrub*' 2>/dev/null | grep -c enabled || echo 0") + local scrub_enabled + scrub_enabled=$(ssh_cmd "systemctl list-unit-files 'zfs-scrub*' 2>/dev/null | grep -c enabled" | tr -d '[:space:]') + scrub_enabled=${scrub_enabled:-0} if [ "$scrub_enabled" -gt 0 ]; then validation_pass "ZFS scrub timer enabled" else -- cgit v1.2.3