export THIN_CHECK_PROG="$(set_prog_path thin_check)"
export PYTHON2_PROG="`set_prog_path python2`"
export SQLITE3_PROG="`set_prog_path sqlite3`"
+export TIMEOUT_PROG="`set_prog_path timeout`"
# use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
# newer systems have udevadm command but older systems like RHEL5 don't.
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_command "$(which timeout)" "timeout"
+_require_command "$TIMEOUT_PROG" "timeout"
test $FSTYP == "nfs" && _notrun "NFS can't interrupt clone operations"
n=$(stat -c '%s' $testdir/file1)
echo "performing kill test on $n bytes..." >> $seqres.full
touch $TEST_DIR/before
-timeout -s INT ${kill_after}s $XFS_IO_PROG -f -c "reflink $testdir/file1 0 $n $n" $testdir/file1 >> $seqres.full 2>&1
+$TIMEOUT_PROG -s INT ${kill_after}s $XFS_IO_PROG -f -c "reflink $testdir/file1 0 $n $n" $testdir/file1 >> $seqres.full 2>&1
touch $TEST_DIR/after
before=$(stat -c '%Y' $TEST_DIR/before)
after=$(stat -c '%Y' $TEST_DIR/after)
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_command "$(which timeout)" "timeout"
+_require_command "$TIMEOUT_PROG" "timeout"
test $FSTYP == "nfs" && _notrun "NFS can't interrupt clone operations"
n=$(stat -c '%s' $testdir/file1)
echo "performing kill test on $n bytes..." >> $seqres.full
touch $TEST_DIR/before
-urk=$(timeout -s KILL ${kill_after}s $XFS_IO_PROG -f -c "reflink $testdir/file1 0 $n $n" $testdir/file1 >> $seqres.full 2>&1)
+urk=$($TIMEOUT_PROG -s KILL ${kill_after}s $XFS_IO_PROG -f -c "reflink $testdir/file1 0 $n $n" $testdir/file1 >> $seqres.full 2>&1)
touch $TEST_DIR/after
before=$(stat -c '%Y' $TEST_DIR/before)
after=$(stat -c '%Y' $TEST_DIR/after)