diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 418657cf..ec14721c 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -17,8 +17,11 @@ for test in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort -g); cd "${test}" echo -n y | bash run.sh > "${LOGFILE}" 2>&1 - if [ $? -eq 0 ]; then + ret=$? + if [ $ret -eq 0 ]; then echo "[PASS]" + elif [ $ret -eq 130 ]; then + echo "[SKIPPED]" else echo "[FAILED] (see ${LOGFILE})" fi diff --git a/tests/syncoid/1_bookmark_replication_intermediate/run.sh b/tests/syncoid/001_bookmark_replication_intermediate/run.sh similarity index 100% rename from tests/syncoid/1_bookmark_replication_intermediate/run.sh rename to tests/syncoid/001_bookmark_replication_intermediate/run.sh diff --git a/tests/syncoid/2_bookmark_replication_no_intermediate/run.sh b/tests/syncoid/002_bookmark_replication_no_intermediate/run.sh similarity index 100% rename from tests/syncoid/2_bookmark_replication_no_intermediate/run.sh rename to tests/syncoid/002_bookmark_replication_no_intermediate/run.sh diff --git a/tests/syncoid/3_force_delete/run.sh b/tests/syncoid/003_force_delete/run.sh similarity index 100% rename from tests/syncoid/3_force_delete/run.sh rename to tests/syncoid/003_force_delete/run.sh diff --git a/tests/syncoid/4_bookmark_replication_edge_case/run.sh b/tests/syncoid/004_bookmark_replication_edge_case/run.sh similarity index 100% rename from tests/syncoid/4_bookmark_replication_edge_case/run.sh rename to tests/syncoid/004_bookmark_replication_edge_case/run.sh diff --git a/tests/syncoid/5_reset_resume_state/run.sh b/tests/syncoid/005_reset_resume_state/run.sh similarity index 99% rename from tests/syncoid/5_reset_resume_state/run.sh rename to tests/syncoid/005_reset_resume_state/run.sh index 43ec78f4..4eb4af62 100755 --- a/tests/syncoid/5_reset_resume_state/run.sh +++ b/tests/syncoid/005_reset_resume_state/run.sh @@ -28,6 +28,8 @@ zfs create -o mountpoint="${MOUNT_TARGET}" "${POOL_NAME}"/src dd if=/dev/urandom of="${MOUNT_TARGET}"/big_file bs=1M count=200 +sleep 1 + ../../../syncoid --debug --compress=none --source-bwlimit=2m "${POOL_NAME}"/src "${POOL_NAME}"/dst & syncoid_pid=$! sleep 5 diff --git a/tests/syncoid/6_reset_resume_state2/run.sh b/tests/syncoid/006_reset_resume_state2/run.sh similarity index 99% rename from tests/syncoid/6_reset_resume_state2/run.sh rename to tests/syncoid/006_reset_resume_state2/run.sh index d05696b6..c568fd4d 100755 --- a/tests/syncoid/6_reset_resume_state2/run.sh +++ b/tests/syncoid/006_reset_resume_state2/run.sh @@ -28,6 +28,8 @@ zfs create -o mountpoint="${MOUNT_TARGET}" "${POOL_NAME}"/src dd if=/dev/urandom of="${MOUNT_TARGET}"/big_file bs=1M count=200 +sleep 1 + zfs snapshot "${POOL_NAME}"/src@big ../../../syncoid --debug --no-sync-snap --compress=none --source-bwlimit=2m "${POOL_NAME}"/src "${POOL_NAME}"/dst & syncoid_pid=$! diff --git a/tests/syncoid/7_preserve_recordsize/run.sh b/tests/syncoid/007_preserve_recordsize/run.sh similarity index 100% rename from tests/syncoid/7_preserve_recordsize/run.sh rename to tests/syncoid/007_preserve_recordsize/run.sh diff --git a/tests/syncoid/8_force_delete_snapshot/run.sh b/tests/syncoid/008_force_delete_snapshot/run.sh similarity index 100% rename from tests/syncoid/8_force_delete_snapshot/run.sh rename to tests/syncoid/008_force_delete_snapshot/run.sh diff --git a/tests/syncoid/9_preserve_properties/run.sh b/tests/syncoid/009_preserve_properties/run.sh similarity index 100% rename from tests/syncoid/9_preserve_properties/run.sh rename to tests/syncoid/009_preserve_properties/run.sh diff --git a/tests/syncoid/10_filter_snaps/run.sh b/tests/syncoid/010_filter_snaps/run.sh similarity index 100% rename from tests/syncoid/10_filter_snaps/run.sh rename to tests/syncoid/010_filter_snaps/run.sh diff --git a/tests/syncoid/815_sync_out-of-order_snapshots/run.sh b/tests/syncoid/011_sync_out-of-order_snapshots/run.sh similarity index 91% rename from tests/syncoid/815_sync_out-of-order_snapshots/run.sh rename to tests/syncoid/011_sync_out-of-order_snapshots/run.sh index af67b36b..bb96ad01 100755 --- a/tests/syncoid/815_sync_out-of-order_snapshots/run.sh +++ b/tests/syncoid/011_sync_out-of-order_snapshots/run.sh @@ -7,9 +7,13 @@ set -e . ../../common/lib.sh -POOL_IMAGE="/tmp/jimsalterjrs_sanoid_815.img" +if [ -z "$ALLOW_INVASIVE_TESTS" ]; then + exit 130 +fi + +POOL_IMAGE="/tmp/syncoid-test-11.zpool" POOL_SIZE="64M" -POOL_NAME="jimsalterjrs_sanoid_815" +POOL_NAME="syncoid-test-11" truncate -s "${POOL_SIZE}" "${POOL_IMAGE}" diff --git a/tests/syncoid/run-tests.sh b/tests/syncoid/run-tests.sh index 55646678..83074139 100755 --- a/tests/syncoid/run-tests.sh +++ b/tests/syncoid/run-tests.sh @@ -17,8 +17,11 @@ for test in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort -g); cd "${test}" echo | bash run.sh > "${LOGFILE}" 2>&1 - if [ $? -eq 0 ]; then + ret=$? + if [ $ret -eq 0 ]; then echo "[PASS]" + elif [ $ret -eq 130 ]; then + echo "[SKIPPED]" else echo "[FAILED] (see ${LOGFILE})" fi