mirror of https://github.com/jimsalterjrs/sanoid
* proper order of tests
* timing fixes for fast NVME pools * skip invasive tests by default
This commit is contained in:
parent
19fc237476
commit
7c8a34eceb
|
|
@ -17,8 +17,11 @@ for test in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort -g);
|
||||||
cd "${test}"
|
cd "${test}"
|
||||||
echo -n y | bash run.sh > "${LOGFILE}" 2>&1
|
echo -n y | bash run.sh > "${LOGFILE}" 2>&1
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
ret=$?
|
||||||
|
if [ $ret -eq 0 ]; then
|
||||||
echo "[PASS]"
|
echo "[PASS]"
|
||||||
|
elif [ $ret -eq 130 ]; then
|
||||||
|
echo "[SKIPPED]"
|
||||||
else
|
else
|
||||||
echo "[FAILED] (see ${LOGFILE})"
|
echo "[FAILED] (see ${LOGFILE})"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -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
|
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 --debug --compress=none --source-bwlimit=2m "${POOL_NAME}"/src "${POOL_NAME}"/dst &
|
||||||
syncoid_pid=$!
|
syncoid_pid=$!
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
@ -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
|
dd if=/dev/urandom of="${MOUNT_TARGET}"/big_file bs=1M count=200
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
zfs snapshot "${POOL_NAME}"/src@big
|
zfs snapshot "${POOL_NAME}"/src@big
|
||||||
../../../syncoid --debug --no-sync-snap --compress=none --source-bwlimit=2m "${POOL_NAME}"/src "${POOL_NAME}"/dst &
|
../../../syncoid --debug --no-sync-snap --compress=none --source-bwlimit=2m "${POOL_NAME}"/src "${POOL_NAME}"/dst &
|
||||||
syncoid_pid=$!
|
syncoid_pid=$!
|
||||||
|
|
@ -7,9 +7,13 @@ set -e
|
||||||
|
|
||||||
. ../../common/lib.sh
|
. ../../common/lib.sh
|
||||||
|
|
||||||
POOL_IMAGE="/tmp/jimsalterjrs_sanoid_815.img"
|
if [ -z "$ALLOW_INVASIVE_TESTS" ]; then
|
||||||
|
exit 130
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
POOL_IMAGE="/tmp/syncoid-test-11.zpool"
|
||||||
POOL_SIZE="64M"
|
POOL_SIZE="64M"
|
||||||
POOL_NAME="jimsalterjrs_sanoid_815"
|
POOL_NAME="syncoid-test-11"
|
||||||
|
|
||||||
truncate -s "${POOL_SIZE}" "${POOL_IMAGE}"
|
truncate -s "${POOL_SIZE}" "${POOL_IMAGE}"
|
||||||
|
|
||||||
|
|
@ -17,8 +17,11 @@ for test in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort -g);
|
||||||
cd "${test}"
|
cd "${test}"
|
||||||
echo | bash run.sh > "${LOGFILE}" 2>&1
|
echo | bash run.sh > "${LOGFILE}" 2>&1
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
ret=$?
|
||||||
|
if [ $ret -eq 0 ]; then
|
||||||
echo "[PASS]"
|
echo "[PASS]"
|
||||||
|
elif [ $ret -eq 130 ]; then
|
||||||
|
echo "[SKIPPED]"
|
||||||
else
|
else
|
||||||
echo "[FAILED] (see ${LOGFILE})"
|
echo "[FAILED] (see ${LOGFILE})"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue