• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:eq +full:- +full:null

18 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
25 # Authors: Manoj Iyer - manjo@mail.utexas.edu
26 # Robbe Williamson - robbiew@us.ibm.com
28 # History: Oct 07 2003 - Modified - Manoj Iyer
29 # - use functions
30 # - clean up on script exit
31 # - error checking etc.
33 # Oct 08 2003 - Modified - Manoj Iyer
34 # - fixed bug in creating results directory
35 # - all checks should be enlclosed in " " to avoid bash error
36 # - exit with error if ltp-pan is not found in pan directory
38 # Jul 22 2007 - Modified - Ricardo Salveti de Araujo
39 # - added support to put more then one file at CMDLINE (-f)
40 # - added a new option, that the user can pass the address of
41 # the command file, and it'll use wget to get it (-w)
42 # - now -s does the grep at the selected command files (default,
43 # -f or -w)
45 # Jul 23 2007 - Modified - Ricardo Salveti de Araujo
46 # - added flag to get the command file that has all failed tests
48 # Sep 11 2007 - Modified - Subrata Modak
49 # - added option to create Failed File if it is not an absolute path
50 # - added option to create Output File if it is not an absolute path
51 # - added option to create Failed File compulsory, even if user has not mentioned it
53 # Sep 14 2007 - Modified - Ricardo Salveti de Araujo
54 # - cleaning and removing duplicated code
56 # Oct 27 2007 - Modified - Ricardo Salveti de Araujo and Subrata Modak
57 # - better ways to integrate "ltp/tools/genload/stress" with "ltp/runltp"
58 # Nov 24 2007 - Modified - Subrata Modak
59 # - Added a new option to generate output in HTML format also. Also retaining
61 # Nov 28 2007 - Modified - Subrata Modak
62 # - Added a new option to mail back LTP reports
63 # May 19 2008 - Modified - Subrata Modak
64 # - Added capability for default Log file generation
65 # Aug 17 2009 - Modified - Subrata Modak
66 # - Added Fault Injection generation Capability through -F Option
85 [ -d "$LTPROOT/testcases/bin" ] ||
92 [ -e "$LTPROOT/bin/ltp-pan" ] ||
94 echo "FATAL: Test suite driver 'ltp-pan' not found"
108 cat <<-EOF >&2
110 usage: ${0##*/} [ -a EMAIL_TO ] [ -c NUM_PROCS ] [ -C FAILCMDFILE ] [ -T TCONFCMDFILE ]
111 [ -d TMPDIR ] [ -D NUM_PROCS,NUM_FILES,NUM_BYTES,CLEAN_FLAG ] -e [ -f CMDFILES(,...) ]
112 [ -g HTMLFILE] [ -i NUM_PROCS ] [ -l LOGFILE ] [ -m NUM_PROCS,CHUNKS,BYTES,HANGUP_FLAG ]
113 -N -n [ -o OUTPUTFILE ] -p -q -Q [ -r LTPROOT ] [ -s PATTERN ] [ -t DURATION ]
114 -v [ -w CMDFILEADDR ] [ -x INSTANCES ] [ -b DEVICE ] [-B LTP_DEV_FS_TYPE]
115 [ -F LOOPS,PERCENTAGE ] [ -z BIG_DEVICE ] [-Z LTP_BIG_DEV_FS_TYPE]
117 -a EMAIL_TO EMAIL all your Reports to this E-mail Address
118 -c NUM_PROCS Run LTP under additional background CPU load
119 [NUM_PROCS = no. of processes creating the CPU Load by spinning over sqrt()
121 -C FAILCMDFILE Command file with all failed test cases.
122 -T TCONFCMDFILE Command file with all test cases that are not fully tested.
123 -d TMPDIR Directory where temporary files will be created.
124 -D NUM_PROCS,NUM_FILES,NUM_BYTES,CLEAN_FLAG
126 [NUM_PROCS = no. of processes creating Storage Load by spinning over write()]
130 -e Prints the date of the current LTP release
131 -f CMDFILES Execute user defined list of testcases (separate with ',')
132-F LOOPS,PERCENTAGE Induce PERCENTAGE Fault in the Kernel Subsystems, and, run each test for LOOPS…
133 -g HTMLFILE Create an additional HTML output format
134 -h Help. Prints all available options.
135 -i NUM_PROCS Run LTP under additional background Load on IO Bus
136 [NUM_PROCS = no. of processes creating IO Bus Load by spinning over sync()]
137 -K DMESG_LOG_DIR
139 -l LOGFILE Log results of test in a logfile.
140 -m NUM_PROCS,CHUNKS,BYTES,HANGUP_FLAG
142 … [NUM_PROCS = no. of processes creating main Memory Load by spinning over malloc()]
146 -M CHECK_TYPE
150 -N Run all the networking tests.
151 -o OUTPUTFILE Redirect test output to a file.
152 -p Human readable format logfiles.
153 -q Print less verbose output to screen. This implies
155 -Q Don't log start of test in kernel log.
156 -r LTPROOT Fully qualified path where testsuite is installed.
157 -R Randomize test order.
158 -s PATTERN Only run test cases which match PATTERN.
159 -S SKIPFILE Skip tests specified in SKIPFILE
160 -t DURATION Execute the testsuite for given duration. Examples:
161 -t 60s = 60 seconds
162 -t 45m = 45 minutes
163 -t 24h = 24 hours
164 -t 2d = 2 days
165 -I ITERATIONS Execute the testsuite ITERATIONS times.
166 -w CMDFILEADDR Uses wget to get the user's list of testcases.
167 -x INSTANCES Run multiple instances of this testsuite.
168 -b DEVICE Some tests require an unmounted block device
170 -B LTP_DEV_FS_TYPE The file system of test block devices.
171 -z BIG_DEVICE Some tests require a big unmounted block device
173 -Z LTP_BIG_DEV_FS_TYPE The file system of the big device
174-W ZOOFILE Specify the zoo file used to record current test tags (default PID of this script)
178 …ample: ${0##*/} -c 2 -i 2 -m 2,4,10240,1 -D 2,10,10240,1 -p -q -l /tmp/result-log.$$ -o /tmp/resu…
221 local DEFAULT_FILE_NAME_GENERATION_TIME=`date +"%Y_%m_%d-%Hh_%Mm_%Ss"`
227 while getopts a:b:B:c:C:T:d:D:ef:F:g:hi:I:K:l:m:M:No:pqQr:Rs:S:t:T:w:x:z:Z:W: arg
233 if [ "$NUM_PROCS" -eq 0 ]; then
238 $LTPROOT/testcases/bin/genload --cpu $NUM_PROCS >/dev/null 2>&1 &
244 FAILCMDFILE="-C $OPTARG" ;;
246 FAILCMDFILE="-C $LTPROOT/output/$OPTARG"
253 TCONFCMDFILE="-T $OPTARG" ;;
255 TCONFCMDFILE="-T $LTPROOT/output/$OPTARG"
260 export TMPBASE=$(readlink -f ${OPTARG}) ;;
276 if [ "$NUM_PROCS" -eq 0 ]; then
279 if [ "$NUM_FILES" -eq 0 ]; then
282 if [ "$NUM_BYTES" -eq 0 ]; then
285 if [ "$CLEAN_FLAG" -ne 1 ]; then
288 if [ "$CLEAN_FLAG" -eq 1 ]; then
290 $LTPROOT/testcases/bin/genload --hdd $NUM_PROCS --hdd-files \
291 $NUM_FILES --hdd-bytes $NUM_BYTES >/dev/null 2>&1 &
294 $LTPROOT/testcases/bin/genload --hdd $NUM_PROCS --hdd-files \
295 $NUM_FILES --hdd-bytes $NUM_BYTES --hdd-noclean >/dev/null 2>&1 &
304 # -f nfs,commands,/tmp/testfile
308 INJECT_FAULT_LOOPS_PER_TEST=`echo $OPTARG |cut -d',' -f1 | tr -d '\n' | tr -d ' '`
309 INJECT_KERNEL_FAULT_PERCENTAGE=`echo $OPTARG |cut -d',' -f2 | tr -d '\n' | tr -d ' '`
331 if [ "$NUM_PROCS" -eq 0 ]; then
336 $LTPROOT/testcases/bin/genload --io $NUM_PROCS >/dev/null 2>&1 &
342 DMESG_DIR="$OPTARG-dmesg-output-`echo $$-``date +%X | tr -d ' '`";;
344 DMESG_DIR="$LTPROOT/output/$OPTARG-dmesg-output-`echo $$-``date +%X | tr -d ' '`";;
346 mkdir -p $DMESG_DIR
352 LOGFILE="-l $OPTARG" ;;
354 LOGFILE="-l $LTPROOT/results/$OPTARG"
372 if [ "$NUM_PROCS" -eq 0 ]; then
375 if [ "$CHUNKS" -eq 0 ]; then
378 if [ "$BYTES" -eq 0 ]; then
381 if [ "$HANGUP_FLAG" -ne 1 ]; then
384 if [ "$HANGUP_FLAG" -eq 1 ]; then
386 $LTPROOT/testcases/bin/genload --vm $NUM_PROCS --vm-chunks \
387 $CHUNKS --vm-bytes $BYTES --vm-hang >/dev/null 2>&1 &
390 $LTPROOT/testcases/bin/genload --vm $NUM_PROCS --vm-chunks \
391 $CHUNKS --vm-bytes $BYTES >/dev/null 2>&1 &
403 OUTPUTFILE="-o $OPTARG";;
405 OUTPUTFILE="-o $LTPROOT/output/$OPTARG"
409 p) PRETTY_PRT="-p";;
411 q) QUIET_MODE="-q";;
413 Q) NO_KMSG="-Q";;
431 DURATION="-t $OPTARG" ;;
439 cat <<-EOF >&1
440 WARNING: The use of -x can cause unpredictable failures, as a
446 INSTANCES="-x $OPTARG";;
459 LOGFILE="-l $LTPROOT/results/LTP_RUN_ON-$LOGFILE_NAME.log"
461 PRETTY_PRT="-p"
471 FAILCMDFILE="-C $LTPROOT/output/LTP_RUN_ON-$FAILED_FILE_NAME.failed"
474 FAILCMDFILE="-C $LTPROOT/output/LTP_RUN_ON-$FAILED_FILE_NAME.failed"
478 FAILCMDFILE="-C $LTPROOT/output/LTP_RUN_ON-$FAILED_FILE_NAME.failed"
487 TCONFCMDFILE="-T $LTPROOT/output/LTP_RUN_ON-${TCONF_FILE_NAME}.tconf"
490 TCONFCMDFILE="-T $LTPROOT/output/LTP_RUN_ON-${TCONF_FILE_NAME}.tconf"
494 TCONFCMDFILE="-T $LTPROOT/output/LTP_RUN_ON-${TCONF_FILE_NAME}.tconf"
498 …if [ "$ALT_HTML_OUT" -eq 1 ] ; then ## User wants the HTML version of the out…
503 OUTPUTFILE="-o $LTPROOT/output/LTP_RUN_ON-$OUTPUTFILE_NAME.output"
509 [ "$ALT_DIR_OUT" -eq 1 ] && \
511 [ ! -d $LTPROOT/output ] && \
514 mkdir -p $LTPROOT/output || \
523 [ "$ALT_DIR_RES" -eq 1 ] && \
525 [ ! -d $LTPROOT/results ] && \
528 mkdir -p $LTPROOT/results || \
536 # Added -m 777 for tests that call tst_tmpdir() and try to
538 mkdir -m 777 -p $TMPBASE || \
544 export TMPTEMPLATE="${TMPBASE}/ltp-XXXXXXXXXX"
545 TMP=`mktemp -d $TMPTEMPLATE` || \
569 [ -n "$INSTANCES" ] && \
571 INSTANCES="$INSTANCES -O ${TMP}"
576 if [ -z "$CMDFILES" ] && [ -z "$CMDFILEADDR" ]; then
579 if [ "$RUN_NETEST" -eq 1 ]; then
583 cat <<-EOF >&1
584 INFO: no command files were provided. Executing following runtest scenario files:
592 [ -f "$scenfile" ] || continue
596 rm -Rf "$TMP"
597 rm -f "$cat_ok_sentinel"
601 rm -f "$cat_ok_sentinel"
604 [ -n "$CMDFILES" ] && \
608 [ -f "$scenfile" ] || scenfile="$LTPROOT/runtest/$scenfile"
612 rm -Rf "$TMP"
618 [ -n "$CMDFILEADDR" ] && \
620 wget -q "${CMDFILEADDR}" -O ${TMP}/wgetcmdfile
621 if [ $? -ne 0 ]; then
632 # The fsx-linux tests use the SCRATCHDEV environment variable as a location
636 [ -n "$SCRATCHDEV" ] && \
640 echo "FATAL: unable to create fsx-linux tests command file"
646 if [ -n "$TAG_RESTRICT_STRING" ]
648 mv -f ${TMP}/alltests ${TMP}/alltests.orig
652 # Blacklist or skip tests if a SKIPFILE was specified with -S
653 if [ -n "${SKIPFILE}" ]; then
656 sed -i "/\<${test_name}\>/c\\${test_name} exit 32;" alltests
668 [ -z "$QUIET_MODE" ] && \
681 if [ -z "$BIG_DEVICE" ]; then
682 echo "no big block device was specified on commandline."
684 echo "You can specify it with option -z"
687 if [ -z "$BIG_DEVICE_FS_TYPE" ]; then
694 …if [ $RUN_REPEATED -gt 1 ]; then # You need to specify at least more than 1 sequential run, else i…
696 echo "Test Tags will be Prepended with ITERATION NO.s....."
698 …sed -e '/^$/ d' -e 's/^[ ,\t]*//' -e '/^#/ d' < ${TMP}/alltests > ${TMP}/alltests.temp ##This remo…
699 …sed 's/^[0-9,a-z,A-Z]*/'"$inc"'_ITERATION_&/' < ${TMP}/alltests.temp > ${TMP}/alltests ## .temp is…
700 while [ $inc -lt $RUN_REPEATED ] ; do
702 …sed 's/^[0-9,a-z,A-Z]*/'"$inc"'_ITERATION_&/' < ${TMP}/alltests.temp >> ${TMP}/alltests #Keep appe…
707 sort -R ${TMP}/alltests -o ${TMP}/alltests
710 [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test start time: $(date)" ; }
711 …PAN_COMMAND="${LTPROOT}/bin/ltp-pan $QUIET_MODE $NO_KMSG -e -S $INSTANCES $DURATION -a ${ZOOFILE} \
712 -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE $TCONFCMDFILE"
714 if [ ! -z "$TAG_RESTRICT_STRING" ] ; then
721 echo $LOGFILE | cut -b4-
725 echo $OUTPUTFILE | cut -b4-
729 echo $FAILCMDFILE | cut -b4-
732 echo $TCONFCMDFILE | cut -b4-
752 if [ -d "/sys/kernel/debug/$debug_subdir" ]
763 awk -v LOOPS=$INJECT_FAULT_LOOPS_PER_TEST \
764 -v PERCENTAGE=$INJECT_KERNEL_FAULT_PERCENTAGE \
765 -f ${LTPROOT}/bin/create_kernel_faults_in_loops_and_probability.awk \
768 rm -rf ${TMP}/alltests.tmp
781 [1-3])
782 awk -v CHECK_LEVEL=$VALGRIND_CHECK_TYPE \
783 -f ${LTPROOT}/bin/create_valgrind_check.awk \
787 rm -rf ${TMP}/alltests.tmp
796 if [ $ALT_DMESG_OUT -eq 1 ] ; then
799 awk -v DMESG_DIR=$DMESG_DIR \
800 -f ${LTPROOT}/bin/create_dmesg_entries_for_each_test.awk \
803 rm -rf ${TMP}/alltests.tmp
807 …"${LTPROOT}/bin/ltp-pan" $QUIET_MODE $NO_KMSG -e -S $INSTANCES $DURATION -a ${ZOOFILE} -n $$ $PRET…
809 if [ $? -eq 0 ]; then
810 echo "INFO: ltp-pan reported all tests PASS"
814 echo "INFO: ltp-pan reported some tests FAIL"
822 # Proactively reap all of the 0-byte files in $DMESG_DIR as they have zero value
825 if [ $ALT_DMESG_OUT -eq 1 ] ; then
826 if ! find "$DMESG_DIR" -size 0 -exec rm {} + ; then
829 if [ -n "$(ls "$DMESG_DIR")" ] ; then
832 echo "No Kernel messages were generated for LTP tests $version_date"
836 …if [ "$ALT_HTML_OUT" -eq 1 ] ; then #User wants the HTML output to be created, it then need…
840 OUTPUT_FILE=`echo $OUTPUTFILE | cut -c4-`
851 if [ "$ALT_EMAIL_OUT" -eq 1 ] ; then ## User wants reports to be e-mailed
854 …if [ "$ALT_HTML_OUT" -ne 1 ] ; then ## The HTML file path is absolute and not $LTPROOT…
855 mkdir -p $LTPROOT/output ## We need to create this Directory
860 …if [ "$ALT_DIR_OUT" -ne 1 ] ; then ## The Output file path is absolute and not $LTPRO…
861 mkdir -p $LTPROOT/output ## We need to create this Directory
866 …if [ "$ALT_DIR_RES" -ne 1 ] ; then ## The Log file path is absolute and not $LTPROOT/…
867 mkdir -p $LTPROOT/results ## We need to create this Directory
871 if [ -d $LTPROOT/output ] ; then
872 tar -cf ./$TAR_FILE_NAME $LTPROOT/output
873 if [ $? -eq 0 ]; then
879 if [ -d $LTPROOT/results ] ; then
880 tar -uf ./$TAR_FILE_NAME $LTPROOT/results
881 if [ $? -eq 0 ]; then
887 …if [ -e $LTPROOT/nohup.out ] ; then ## If User would have Chosen nohup to do ltprun
888 tar -uf ./$TAR_FILE_NAME $LTPROOT/nohup.out
889 if [ $? -eq 0 ]; then
896 if [ $? -eq 0 ]; then
901 if which mutt >/dev/null 2>&1; then
903 … mutt -a ./$TAR_FILE_NAME.gz -s "LTP Reports on $test_start_time" -- $EMAIL_TO < /dev/null
904 if [ $? -eq 0 ]; then
911 …uuencode ./$TAR_FILE_NAME.gz $TAR_FILE_NAME.gz | mail $EMAIL_TO -s "LTP Reports on $test_start_ti…
912 if [ $? -eq 0 ]; then
920 [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test end time: $(date)" ; }
922 [ "$GENLOAD" -eq 1 ] && { killall -9 genload >/dev/null 2>&1; }
923 [ "$NETPIPE" -eq 1 ] && { killall -9 NPtcp >/dev/null 2>&1; }
925 [ "$ALT_DIR_OUT" -eq 1 ] || [ "$ALT_DIR_RES" -eq 1 ] && \
927 cat <<-EOF >&1
942 if [ -n "$DEVICE" ]; then
949 [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV
950 rm -rf ${TMP}