aboutsummaryrefslogtreecommitdiffstats
path: root/check
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-04-25 17:14:34 -0700
committerZorro Lang <zlang@kernel.org>2023-05-01 00:04:09 +0800
commit3e85dd4fe4236d8ef8dc9f9b542a56dd00d16a17 (patch)
tree956ca595b766f85ad7327680650d7a3d42f86d0a /check
parent2b56a7d93ab05a9dde71225a25e2a1f5ab5840b4 (diff)
downloadxfstests-dev-3e85dd4fe4236d8ef8dc9f9b542a56dd00d16a17.tar.gz
misc: add duration for long soak tests
Make it so that test runners can schedule long soak stress test programs for an exact number of seconds by setting the SOAK_DURATION config variable. Change the definition of the 'soak' test to specify that these tests can be controlled via SOAK_DURATION. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
-rwxr-xr-xcheck12
1 files changed, 12 insertions, 0 deletions
diff --git a/check b/check
index ce5431a0b4..e36978c198 100755
--- a/check
+++ b/check
@@ -367,6 +367,18 @@ if ! . ./common/rc; then
exit 1
fi
+# If the test config specified a soak test duration, see if there are any
+# unit suffixes that need converting to an integer seconds count.
+if [ -n "$SOAK_DURATION" ]; then
+ SOAK_DURATION="$(echo "$SOAK_DURATION" | \
+ sed -e 's/^\([.0-9]*\)\([a-z]\)*/\1 \2/g' | \
+ $AWK_PROG -f $here/src/soak_duration.awk)"
+ if [ $? -ne 0 ]; then
+ status=1
+ exit 1
+ fi
+fi
+
if [ -n "$subdir_xfile" ]; then
for d in $SRC_GROUPS $FSTYP; do
[ -f $SRC_DIR/$d/$subdir_xfile ] || continue