summaryrefslogtreecommitdiff
path: root/tests/fs-tests/stress/fs_stress01.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fs-tests/stress/fs_stress01.sh.in')
-rwxr-xr-xtests/fs-tests/stress/fs_stress01.sh.in46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/fs-tests/stress/fs_stress01.sh.in b/tests/fs-tests/stress/fs_stress01.sh.in
new file mode 100755
index 0000000..d0ea8f9
--- /dev/null
+++ b/tests/fs-tests/stress/fs_stress01.sh.in
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libexecpath=@libexecdir@/mtd-utils
+TESTBINDIR=@testbindir@
+
+TEST_DIR=$TEST_FILE_SYSTEM_MOUNT_DIR
+if test -z "$TEST_DIR";
+then
+ TEST_DIR="/mnt/test_file_system"
+fi
+
+FREESPACE=`$TESTBINDIR/free_space "$TEST_DIR"`
+
+if test -z "$FREESPACE";
+then
+ echo "Failed to determine free space"
+ exit 1
+fi
+
+if test -n "$1";
+then
+ DURATION="-d$1";
+else
+ DURATION="";
+fi
+
+FWRITE00=$TESTBINDIR/fwrite00
+RNDWR=$TESTBINDIR/rndwrite00
+PDFLUSH=$TESTBINDIR/pdfrun
+FSIZE=$(( $FREESPACE/15 ));
+
+$TESTBINDIR/fstest_monitor $DURATION \
+"$FWRITE00 -z $FSIZE -n0 -p 300" \
+"$FWRITE00 -z $FSIZE -n0 -u" \
+"$FWRITE00 -z $FSIZE -n0 -u -c" \
+"$FWRITE00 -z $FSIZE -n0 -s -o" \
+"$RNDWR -z $FSIZE -n0 -e"
+
+STATUS=$?
+
+rm -rf ${TEST_DIR}/*
+
+exit $STATUS