diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-20 06:52:36 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-20 06:52:36 -0600 |
| commit | a21f2007a11000b578596057048616a50ed0431e (patch) | |
| tree | 212f82e4f7d87193f9e877b59ef7f457fdeaafd9 /scripts/testing/lib | |
| parent | 2b696749af25b43a88ccc56111ed17eb73d162ca (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'scripts/testing/lib')
| -rw-r--r-- | scripts/testing/lib/validation.sh | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
