diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-04-25 17:14:34 -0700 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-05-01 00:04:09 +0800 |
commit | 3e85dd4fe4236d8ef8dc9f9b542a56dd00d16a17 (patch) | |
tree | 956ca595b766f85ad7327680650d7a3d42f86d0a /check | |
parent | 2b56a7d93ab05a9dde71225a25e2a1f5ab5840b4 (diff) | |
download | xfstests-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-x | check | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |