Skip to content

Commit

Permalink
Merge pull request jimsalterjrs#904 from phreaker0/tests-restructure
Browse files Browse the repository at this point in the history
test adaptions
  • Loading branch information
jimsalterjrs authored Apr 22, 2024
2 parents d800e5e + 4e86733 commit 1207ea0
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 4 deletions.
5 changes: 4 additions & 1 deletion tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=$!
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
5 changes: 4 additions & 1 deletion tests/syncoid/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1207ea0

Please sign in to comment.