sanoid/tests
Nick Liu 1952e96846
fix(tests/common/lib.sh): Support set -e in test scripts
The `systemctl is-active virtualbox-guest-utils.service` command returns
a non-zero exit status when the service is inactive, causing early exit
in tests that use `set -e`.

This change suppresses that error with `|| true` to prevent test failure
when the service check returns non-zero.

Fixes this test:

```
root@demo:~/sanoid/tests/syncoid# cat /tmp/syncoid_test_run_011_sync_out-of-order_snapshots.log
+ set -e
+ . ../../common/lib.sh
+++ uname
++ unamestr=Linux
+ POOL_IMAGE=/tmp/jimsalterjrs_sanoid_815.img
+ POOL_SIZE=64M
+ POOL_NAME=jimsalterjrs_sanoid_815
+ truncate -s 64M /tmp/jimsalterjrs_sanoid_815.img
+ zpool create -m none -f jimsalterjrs_sanoid_815 /tmp/jimsalterjrs_sanoid_815.img
+ trap cleanUp EXIT
+ zfs create jimsalterjrs_sanoid_815/before
+ zfs snapshot jimsalterjrs_sanoid_815/before@this-snapshot-should-make-it-into-the-after-dataset
+ disableTimeSync
+ which timedatectl
+ '[' 0 -eq 0 ']'
+ timedatectl set-ntp 0
+ which systemctl
+ '[' 0 -eq 0 ']'
+ systemctl is-active virtualbox-guest-utils.service
inactive
+ cleanUp
+ zpool export jimsalterjrs_sanoid_815
+ rm -f /tmp/jimsalterjrs_sanoid_815.img
```
2025-06-18 00:15:44 +02:00
..
1_one_year prepare v2.3.0 2025-06-09 23:21:44 +02:00
2_dst_handling prepare v2.3.0 2025-06-09 23:21:44 +02:00
common fix(tests/common/lib.sh): Support set -e in test scripts 2025-06-18 00:15:44 +02:00
syncoid test(syncoid): Add test to verify out-of-order snapshot sync 2025-06-11 13:01:00 -05:00
run-tests.sh Revert "Merge pull request #818 from Deltik/fix/815" 2025-06-05 23:23:30 +02:00