From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
fstests@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: [PATCH 2/3] fstests: define and use TIMEOUT_PROG
Date: Mon, 14 May 2018 08:49:50 +0300 [thread overview]
Message-ID: <1526276991-23897-3-git-send-email-amir73il@gmail.com> (raw)
In-Reply-To: <1526276991-23897-1-git-send-email-amir73il@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
common/config | 1 +
tests/generic/297 | 4 ++--
tests/generic/298 | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/common/config b/common/config
index cc31806..af360ce 100644
--- a/common/config
+++ b/common/config
@@ -204,6 +204,7 @@ export UBIUPDATEVOL_PROG="`set_prog_path ubiupdatevol`"
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.
diff --git a/tests/generic/297 b/tests/generic/297
index f7eb37b..a3ba5c4 100755
--- a/tests/generic/297
+++ b/tests/generic/297
@@ -45,7 +45,7 @@ _cleanup()
_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"
@@ -83,7 +83,7 @@ kill_after=2 # give us a shorter time to die
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)
diff --git a/tests/generic/298 b/tests/generic/298
index b518da1..a4d458c 100755
--- a/tests/generic/298
+++ b/tests/generic/298
@@ -45,7 +45,7 @@ _cleanup()
_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"
@@ -83,7 +83,7 @@ kill_after=2 # give us a shorter time to die
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)
--
2.7.4
next prev parent reply other threads:[~2018-05-14 5:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 5:49 [PATCH 0/3] ext4 freeze regression test Amir Goldstein
2018-05-14 5:49 ` [PATCH 1/3] generic/459: use xfs_freeze instead of fsfreeze Amir Goldstein
2018-05-14 23:01 ` Dave Chinner
2018-05-15 5:25 ` Amir Goldstein
2018-05-15 13:50 ` Amir Goldstein
2018-05-16 0:47 ` Dave Chinner
2018-05-17 2:36 ` Eryu Guan
2018-05-14 5:49 ` Amir Goldstein [this message]
2018-05-14 5:49 ` [PATCH 3/3] generic: test first read with freeze right after mount Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1526276991-23897-3-git-send-email-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox