diff --git a/227 b/227 new file mode 100755 index 0000000..cf15d5f --- /dev/null +++ b/227 @@ -0,0 +1,108 @@ +#! /bin/bash +# FS QA Test No. 227 +# +# Perform fsstress test with parallel dd +# This proven to be a good stress test +# * Continuous dd retult in ENOSPC condition but only for a limited periods +# of time. +# * Fsstress test cover many code paths +# +#----------------------------------------------------------------------- +# Copyright (c) 2010 Dmitry Monakhov. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +#----------------------------------------------------------------------- +# +# creator +owner=dmonakhov@openvz.org + +seq=`basename $0` +echo "QA output created by $seq" +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! + +_cleanup() +{ + rm -f $tmp.* +} + +workout() +{ + # Disable bash job controll, to prevent message about killed task. + set +m + + #Timing parameters + nr_iterations=5 + kill_tries=20 + echo Running fsstress. | tee -a $seq.full + +#################################################### +## -f unresvsp=0 -f allocsp=0 -f freesp=0 \ +## -f setxattr=0 -f attr_remove=0 -f attr_set=0 \ +## +###################################################### + mkdir -p $SCRATCH_MNT/fsstress + # It is reasonable to disable sync, otherwise most of tasks will simply + # stuck in that sync() call. + $FSSTRESS_PROG \ + -d $SCRATCH_MNT/fsstress \ + -p 100 -f sync=0 -n 9999999 >>$seq.full 2>&1 & + + echo Running ENOSPC hitters. | tee -a $seq.full + for ((i = 0; i < $nr_iterations; i++)) + do + #Open with O_TRUNC and then write until error + #hit ENOSPC each time. + dd if=/dev/zero of=$SCRATCH_MNT/BIG_FILE bs=1M 2> /dev/null + done + + for ((i = 0; i < $kill_tries; i++)) + do + killall -r -q -TERM fsstress 2> /dev/null + sleep 1 + done +} + +trap "_cleanup ; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here +_supported_fs generic +_supported_os Linux +_require_scratch + +rm -f $seq.full + +umount $TEST_DEV >/dev/null 2>&1 +umount $SCRATCH_DEV >/dev/null 2>&1 +echo "*** MKFS ***" >>$seq.full +echo "" >>$seq.full +SIZE=`expr 1000 \* 1024 \* 1024` +$_scratch_mkfs_sized $SIZE &> /dev/null + +_scratch_mkfs_sized $SIZE >/dev/null 2>&1 || _fail "mkfs failed" +_scratch_mount >/dev/null 2>&1 || _fail "mount failed" + +workout +umount $SCRATCH_MNT +echo +echo Checking filesystem +_check_scratch_fs +status=$? +exit diff --git a/227.out b/227.out new file mode 100644 index 0000000..6a7342d --- /dev/null +++ b/227.out @@ -0,0 +1,5 @@ +QA output created by 227 +Running fsstress. +Running ENOSPC hitters. + +Checking filesystem diff --git a/group b/group index 8d4a83a..81a2aa4 100644 --- a/group +++ b/group @@ -339,3 +339,4 @@ deprecated 223 auto quick 224 auto 225 auto quick +227 rw auto prealloc enospc \ No newline at end of file