brief_test_summary=false
do_report=false
DUMP_OUTPUT=false
+iterations=1
# This is a global variable used to pass test failure text to reporting gunk
_err_msg=""
-glusterfs test GlusterFS
-cifs test CIFS
-9p test 9p
+ -virtiofs test virtiofs
-overlay test overlay
-pvfs2 test PVFS2
-tmpfs test TMPFS
-n show me, do not run tests
-T output timestamps
-r randomize test order
+ -i <n> iterate the test list <n> times
-d dump test output to stdout
-b brief test summary
-R fmt[,fmt] generate report in formats specified. Supported format: [xunit]
-glusterfs) FSTYP=glusterfs ;;
-cifs) FSTYP=cifs ;;
-9p) FSTYP=9p ;;
+ -virtiofs) FSTYP=virtiofs ;;
-overlay) FSTYP=overlay; export OVERLAY=true ;;
-pvfs2) FSTYP=pvfs2 ;;
-tmpfs) FSTYP=tmpfs ;;
-n) showme=true ;;
-r) randomize=true ;;
-
+ -i) iterations=$2; shift ;;
-T) timestamp=true ;;
-d) DUMP_OUTPUT=true ;;
-b) brief_test_summary=true;;
trap "_wrapup; exit \$status" 0 1 2 3 15
fi
-for section in $HOST_OPTIONS_SECTIONS; do
+function run_section()
+{
+ local section=$1
+
OLD_FSTYP=$FSTYP
OLD_TEST_FS_MOUNT_OPTS=$TEST_FS_MOUNT_OPTS
get_next_config $section
fi
done
if $skip; then
- continue
+ return
fi
fi
fi
done
if $skip; then
- continue
+ return
fi
fi
seqres="$REPORT_DIR/$seqnum"
mkdir -p $RESULT_DIR
+ rm -f ${RESULT_DIR}/require_scratch*
+ rm -f ${RESULT_DIR}/require_test*
echo -n "$seqnum"
if $showme; then
touch ${RESULT_DIR}/check_dmesg
fi
_try_wipe_scratch_devs > /dev/null 2>&1
+
+ # clear the WARN_ONCE state to allow a potential problem
+ # to be reported for each test
+ (echo 1 > $DEBUGFS_MNT/clear_warn_once) > /dev/null 2>&1
+
if [ "$DUMP_OUTPUT" = true ]; then
_run_seq 2>&1 | tee $tmp.out
# Because $? would get tee's return code
_check_dmesg || err=true
fi
+ # Reload the module after each test to check for leaks or
+ # other problems.
+ if [ -n "${TEST_FS_MODULE_RELOAD}" ]; then
+ _test_unmount 2> /dev/null
+ _scratch_unmount 2> /dev/null
+ modprobe -r fs-$FSTYP
+ modprobe fs-$FSTYP
+ fi
+
# Scan for memory leaks after every test so that associating
# a leak to a particular test will be as accurate as possible.
_check_kmemleak || err=true
_test_unmount 2> /dev/null
_scratch_unmount 2> /dev/null
+}
+
+for ((iters = 0; iters < $iterations; iters++)) do
+ for section in $HOST_OPTIONS_SECTIONS; do
+ run_section $section
+ done
done
interrupt=false