blob: ff4ed6755716ce156fbbb300372b016b753314c8 [file] [log] [blame]
plars4a120e82004-09-02 18:56:06 +00001#!/bin/sh
2################################################################################
3## ##
4## Copyright (c) International Business Machines Corp., 2001 ##
5## ##
6## This program is free software; you can redistribute it and#or modify ##
7## it under the terms of the GNU General Public License as published by ##
8## the Free Software Foundation; either version 2 of the License, or ##
9## (at your option) any later version. ##
10## ##
11## This program is distributed in the hope that it will be useful, but ##
12## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
13## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
14## for more details. ##
15## ##
16## You should have received a copy of the GNU General Public License ##
17## along with this program; if not, write to the Free Software ##
18## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
19## ##
20################################################################################
21# File: runltp
22#
23# Description: This script can be used to the tests in the LTP test suite
24#
25# Authors: Manoj Iyer - manjo@mail.utexas.edu
26# Robbe Williamson - robbiew@us.ibm.com
27#
28# History: Oct 07 2003 - Modified - Manoj Iyer
29# - use functions
30# - clean up on script exit
31# - error checking etc.
32#
33# Oct 08 2003 - Modified - Manoj Iyer
34# - fixed bug in creating results directory
subrata_modaka1fd64b2007-04-11 11:24:49 +000035# - all checks should be enlclosed in " " to avoid bash error
plars4a120e82004-09-02 18:56:06 +000036# - exit with error if pan is not found in pan directory
subrata_modakbc833d32007-07-25 10:12:02 +000037#
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)
44#
45# Jul 23 2007 - Modified - Ricardo Salveti de Araujo
46# - added flag to get the command file that has all failed tests
subrata_modak6838ec32007-09-14 10:10:12 +000047#
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
52#
subrata_modak5d7deea2007-09-15 13:51:36 +000053# Sep 14 2007 - Modified - Ricardo Salveti de Araujo
54# - cleaning and removing duplicated code
55#
subrata_modak6838ec32007-09-14 10:10:12 +000056#################################################################################
subrata_modakbc833d32007-07-25 10:12:02 +000057
plars4a120e82004-09-02 18:56:06 +000058
59
60setup()
61{
62 cd `dirname $0` || \
63 {
64 echo "FATAL: unable to change directory to $(dirname $0)"
65 exit 1
66 }
67 export LTPROOT=${PWD}
68 export TMPBASE="/tmp"
69 export TMP="${TMPBASE}/ltp-$$"
subrata_modak4a57fe82007-09-24 06:40:12 +000070 export TMPDIR="${TMP}"
plars4a120e82004-09-02 18:56:06 +000071 export PATH="${PATH}:${LTPROOT}/testcases/bin"
72
73 [ -d $LTPROOT/testcases/bin ] ||
74 {
75 echo "FATAL: Test suite not installed correctly"
76 echo "INFO: as root user type 'make ; make install'"
77 exit 1
78 }
79
80 [ -e $LTPROOT/pan/pan ] ||
81 {
82 echo "FATAL: Test suite driver 'pan' not found"
83 echo "INFO: as root user type 'make ; make install'"
84 exit 1
85 }
86}
87
mreed1091696422006-05-03 19:07:22 +000088version_of_ltp()
89{
subrata_modaka1fd64b2007-04-11 11:24:49 +000090 head -n 1 $LTPROOT/ChangeLog
91 exit 0
mreed1091696422006-05-03 19:07:22 +000092}
plars4a120e82004-09-02 18:56:06 +000093
94usage()
95{
96 cat <<-EOF >&2
97
subrata_modakbc833d32007-07-25 10:12:02 +000098 usage: ./${0##*/} -c [-C FAILCMDFILE ] [-d TMPDIR] [-f CMDFILES(,...) ]
99 [-i # (in Mb)] [ -l LOGFILE ] [ -o OUTPUTFILE ] [ -m # (in Mb)] -N -n -q
100 [ -r LTPROOT ] [ -s PATTERN ] [ -t DURATION ] -v [ -w CMDFILEADDR ]
101 [ -x INSTANCES ]
plars4a120e82004-09-02 18:56:06 +0000102
subrata_modakbc833d32007-07-25 10:12:02 +0000103 -C FAILCMDFILE Command file with all failed test cases.
plars4a120e82004-09-02 18:56:06 +0000104 -c NUM_PROCS Run LTP under additional background CPU load.
105 -d TMPDIR Directory where temporary files will be created.
mreed1091696422006-05-03 19:07:22 +0000106 -e Prints the date of the current LTP release
subrata_modakbc833d32007-07-25 10:12:02 +0000107 -f CMDFILES Execute user defined list of testcases (separate with ',')
plars4a120e82004-09-02 18:56:06 +0000108 -h Help. Prints all available options.
109 -i # (in Mb) Run LTP with a _min_ IO load of # Mb in background.
110 -l LOGFILE Log results of test in a logfile.
111 -m # (in Mb) Run LTP with a _min_ memory load of # Mb in background.
112 -N Run all the networking tests.
113 -n Run LTP with network traffic in background.
114 -o OUTPUTFILE Redirect test output to a file.
115 -p Human readable format logfiles.
116 -q Print less verbose output to screen.
117 -r LTPROOT Fully qualified path where testsuite is installed.
subrata_modaka1fd64b2007-04-11 11:24:49 +0000118 -s PATTERN Only run test cases which match PATTERN.
plars4a120e82004-09-02 18:56:06 +0000119 -t DURATION Execute the testsuite for given duration. Examples:
120 -t 60s = 60 seconds
121 -t 45m = 45 minutes
122 -t 24h = 24 hours
123 -t 2d = 2 days
robbiew7d43d772005-02-07 20:07:30 +0000124 -v Print more verbose output to screen.
subrata_modakbc833d32007-07-25 10:12:02 +0000125 -w CMDFILEADDR Uses wget to get the user's list of testcases.
plars4a120e82004-09-02 18:56:06 +0000126 -x INSTANCES Run multiple instances of this testsuite.
127
128 example: ./${0##*/} -i 1024 -m 128 -p -q -l /tmp/resultlog.$$ -d ${PWD}
129
plars4a120e82004-09-02 18:56:06 +0000130
131 EOF
132exit 0
133}
134
plars4a120e82004-09-02 18:56:06 +0000135main()
136{
subrata_modakbc833d32007-07-25 10:12:02 +0000137 local CMDFILES=""
plars4a120e82004-09-02 18:56:06 +0000138 local PRETTY_PRT=""
subrata_modak5d7deea2007-09-15 13:51:36 +0000139 local ALT_DIR_OUT=0
140 local ALT_DIR_RES=0
plars4a120e82004-09-02 18:56:06 +0000141 local RUN_NETEST=0
142 local QUIET_MODE=""
robbiew7d43d772005-02-07 20:07:30 +0000143 local VERBOSE_MODE=""
plars4a120e82004-09-02 18:56:06 +0000144 local NETPIPE=0
145 local GENLOAD=0
146 local MEMSIZE=0
147 local DURATION=""
subrata_modakbc833d32007-07-25 10:12:02 +0000148 local CMDFILEADDR=""
plars4a120e82004-09-02 18:56:06 +0000149 local BYTESIZE=0
150 local LOGFILE=""
151 local SCENFILES=""
152 local PRETTY_PRT=""
robbiew7d43d772005-02-07 20:07:30 +0000153 local TAG_RESTRICT_STRING=""
154 local PAN_COMMAND=""
mreed1091696422006-05-03 19:07:22 +0000155 version_date=`head -n 1 $LTPROOT/ChangeLog`
plars4a120e82004-09-02 18:56:06 +0000156
subrata_modakbc833d32007-07-25 10:12:02 +0000157 while getopts c:C:d:f:ehi:l:m:Nno:pqr:s:t:vw:x: arg
plars4a120e82004-09-02 18:56:06 +0000158 do case $arg in
159 c)
160 NUM_PROCS=$(($OPTARG))
161 $LTPROOT/testcases/bin/genload --cpu $NUM_PROCS >/dev/null 2>&1 &
162 GENLOAD=1 ;;
subrata_modakbc833d32007-07-25 10:12:02 +0000163
subrata_modak5d7deea2007-09-15 13:51:36 +0000164 C)
subrata_modak6838ec32007-09-14 10:10:12 +0000165 case $OPTARG in
166 /*)
167 FAILCMDFILE="-C $OPTARG" ;;
168 *)
169 FAILCMDFILE="-C $LTPROOT/output/$OPTARG"
subrata_modak5d7deea2007-09-15 13:51:36 +0000170 ALT_DIR_OUT=1 ;;
subrata_modak6838ec32007-09-14 10:10:12 +0000171 esac ;;
plars4a120e82004-09-02 18:56:06 +0000172
173 d) # append $$ to TMP, as it is recursively
174 # removed at end of script.
subrata_modak4a57fe82007-09-24 06:40:12 +0000175 export TMPBASE=$OPTARG
176 export TMP="${TMPBASE}/ltp-$$"
robbiew538bc1a2005-03-11 19:26:14 +0000177 export TMPDIR="$TMP";;
mreed1091696422006-05-03 19:07:22 +0000178 e) # Print out the version of LTP
179 version_of_ltp
180 ;;
plars4a120e82004-09-02 18:56:06 +0000181 f) # Execute user defined set of testcases.
subrata_modakbc833d32007-07-25 10:12:02 +0000182 # Can be more then one file, just separate it with ',', like:
183 # -f nfs,commands,/tmp/testfile
184 CMDFILES=$OPTARG;;
plars4a120e82004-09-02 18:56:06 +0000185
186 h) usage;;
187
188 i)
189 BYTESIZE=$(($OPTARG * 1024 * 1024))
190 $LTPROOT/testcases/bin/genload --io 1 >/dev/null 2>&1 &
mreed1056ecf392007-02-28 02:09:46 +0000191 $LTPROOT/testcases/bin/genload --hdd 1 --hdd-bytes $BYTESIZE \
plars4a120e82004-09-02 18:56:06 +0000192 >/dev/null 2>&1 &
193 GENLOAD=1 ;;
194
195 l)
subrata_modak6838ec32007-09-14 10:10:12 +0000196 LOGFILE_NAME="$OPTARG"
plars4a120e82004-09-02 18:56:06 +0000197 case $OPTARG in
subrata_modak5d7deea2007-09-15 13:51:36 +0000198 /*)
plars4a120e82004-09-02 18:56:06 +0000199 LOGFILE="-l $OPTARG" ;;
200 *)
201 LOGFILE="-l $LTPROOT/results/$OPTARG"
subrata_modak5d7deea2007-09-15 13:51:36 +0000202 ALT_DIR_RES=1 ;;
plars4a120e82004-09-02 18:56:06 +0000203 esac ;;
204
205 m)
206 MEMSIZE=$(($OPTARG * 1024 * 1024))
207 $LTPROOT/testcases/bin/genload --vm 0 --vm-bytes $MEMSIZE \
208 >/dev/null 2>&1 &
209 GENLOAD=1;;
210
211 N) RUN_NETEST=1;;
212
213 n)
214 $LTPROOT/testcases/bin/netpipe.sh
215 NETPIPE=1;;
216
subrata_modak6838ec32007-09-14 10:10:12 +0000217 o) OUTPUTFILE_NAME="$OPTARG"
subrata_modak6838ec32007-09-14 10:10:12 +0000218 case $OPTARG in
219 /*)
220 OUTPUTFILE="-o $OPTARG";;
221 *)
222 OUTPUTFILE="-o $LTPROOT/output/$OPTARG"
subrata_modak5d7deea2007-09-15 13:51:36 +0000223 ALT_DIR_OUT=1 ;;
subrata_modak6838ec32007-09-14 10:10:12 +0000224 esac ;;
plars4a120e82004-09-02 18:56:06 +0000225
226 p) PRETTY_PRT=" -p ";;
227
228 q) QUIET_MODE=" -q ";;
229
230 r) LTPROOT=$OPTARG;;
231
robbiew7d43d772005-02-07 20:07:30 +0000232 s) TAG_RESTRICT_STRING=$OPTARG;;
233
plars4a120e82004-09-02 18:56:06 +0000234 t) # In case you want to specify the time
235 # to run from the command line
236 # (2m = two minutes, 2h = two hours, etc)
237 DURATION="-t $OPTARG" ;;
238
robbiew7d43d772005-02-07 20:07:30 +0000239 v) VERBOSE_MODE=1;;
subrata_modakbc833d32007-07-25 10:12:02 +0000240
241 w) CMDFILEADDR=$OPTARG;;
robbiew7d43d772005-02-07 20:07:30 +0000242
plars4a120e82004-09-02 18:56:06 +0000243 x) # number of ltp's to run
244 cat <<-EOF >&1
245 WARNING: The use of -x can cause unpredictable failures, as a
246 result of concurrently running multiple tests designed
247 to be ran exclusively.
248 Pausing for 10 seconds..."
249 EOF
250 sleep 10
251 INSTANCES="-x $OPTARG -O ${TMP}";;
252
253 \?) usage;;
254 esac
255 done
subrata_modak6838ec32007-09-14 10:10:12 +0000256
257 ## It would be nice if a Failed File is compulsorily created (gives User better Idea of Tests that failed)
258
259 if [ ! "$FAILCMDFILE" ]; then ## User has not mentioned about Failed File name
260 echo Inside Failed File Name not Mentioned
subrata_modak5d7deea2007-09-15 13:51:36 +0000261 ALT_DIR_OUT=1
subrata_modak6838ec32007-09-14 10:10:12 +0000262 if [ ! "$OUTPUTFILE" ]; then ## User has not mentioned about Output File name either
263 if [ ! "$LOGFILE" ]; then ## User has not mentioned about Log File name either
264 FAILED_FILE_NAME=`date +"%Y_%b_%d-%Hh_%Mm_%Ss"`
265 FAILCMDFILE="-C $LTPROOT/output/LTP_RUN_ON-$FAILED_FILE_NAME.failed"
subrata_modak6838ec32007-09-14 10:10:12 +0000266 else ## User Fortunately wanted a log file,
267 FAILED_FILE_NAME=`basename $LOGFILE_NAME` ## Extract log file name and use it to construct Failed file name
268 FAILCMDFILE="-C $LTPROOT/output/LTP_RUN_ON-$FAILED_FILE_NAME.failed"
subrata_modak6838ec32007-09-14 10:10:12 +0000269 fi
270 else ## User Fortunately wanted a Output file
271 FAILED_FILE_NAME=`basename $OUTPUTFILE_NAME` ## Extract output file name and use it to construct Failed file name
272 FAILCMDFILE="-C $LTPROOT/output/LTP_RUN_ON-$FAILED_FILE_NAME.failed"
subrata_modak6838ec32007-09-14 10:10:12 +0000273 fi
274 fi
subrata_modaka1fd64b2007-04-11 11:24:49 +0000275
subrata_modak5d7deea2007-09-15 13:51:36 +0000276 # If we need, create the output directory
277 [ "$ALT_DIR_OUT" -eq 1 ] && \
278 {
279 echo "INFO: creating $LTPROOT/output directory"
280 [ ! -d $LTPROOT/output ] && \
281 {
282 mkdir -p $LTPROOT/output || \
283 {
284 echo "ERROR: failed to create $LTPROOT/output"
285 exit 1
286 }
287 }
288 }
289 # If we need, create the results directory
290 [ "$ALT_DIR_RES" -eq 1 ] && \
291 {
292 echo "INFO: creating $LTPROOT/results directory"
293 [ ! -d $LTPROOT/results ] && \
294 {
295 mkdir -p $LTPROOT/results || \
296 {
297 echo "ERROR: failed to create $LTPROOT/results"
298 exit 1
299 }
300 }
301 }
302
subrata_modaka1fd64b2007-04-11 11:24:49 +0000303 # Added -m 777 for tests that call tst_tmpdir() and try to
304 # write to it as user nobody
305 mkdir -m 777 -p $TMP || \
plars4a120e82004-09-02 18:56:06 +0000306 {
robbiew7d43d772005-02-07 20:07:30 +0000307 echo "FATAL: Unable to make temporary directory $TMP"
plars4a120e82004-09-02 18:56:06 +0000308 exit 1
309 }
310
311 cd $TMP || \
312 {
313 echo "could not cd ${TMP} ... exiting"
314 exit 1
315 }
316
317 [ "$RUN_NETEST" -eq 1 ] && \
318 {
319 [ -z "$RHOST" ] || [ -z "$PASSWD" ] && \
320 {
321 [ -z "$RHOST" ] && \
322 {
323 echo \
324 "INFO: Enter RHOST = 'name of the remote host machine'"
325 echo -n "-> "
326 read RHOST
327 }
328
329 [ -z "$PASSWD" ] && \
330 {
331 echo " "
332 echo \
333 "INFO: Enter PASSWD = 'root passwd of the remote host machine'"
334 echo -n "-> "
335 read PASSWD
336 }
337 export RHOST=$RHOST
338 export PASSWD=$PASSWD
339 echo "WARNING: security of $RHOST may be compromised"
340 }
341 }
342
343 # If user does not provide a command file select a default set of testcases
344 # to execute.
subrata_modakbc833d32007-07-25 10:12:02 +0000345 if [ -z "$CMDFILES" ] && [ -z "$CMDFILEADDR" ]
plars4a120e82004-09-02 18:56:06 +0000346 then
subrata_modakbc833d32007-07-25 10:12:02 +0000347 cat <<-EOF >&1
plars4a120e82004-09-02 18:56:06 +0000348
349 INFO: no command files were provided, using default,
350 system calls, memory management, IPC, scheduler
351 direct io, file system, math and pty tests will
352 now be executed
353
354 EOF
355
subrata_modakbc833d32007-07-25 10:12:02 +0000356 for SCENFILES in ${LTPROOT}/runtest/syscalls ${LTPROOT}/runtest/fs \
plars4a120e82004-09-02 18:56:06 +0000357 ${LTPROOT}/runtest/fsx ${LTPROOT}/runtest/dio \
358 ${LTPROOT}/runtest/mm ${LTPROOT}/runtest/ipc \
359 ${LTPROOT}/runtest/sched ${LTPROOT}/runtest/math \
subrata_modak0c5f9702007-04-26 11:02:47 +0000360 ${LTPROOT}/runtest/nptl ${LTPROOT}/runtest/pty \
361 ${LTPROOT}/runtest/containers
plars4a120e82004-09-02 18:56:06 +0000362 do
363 [ -a "$SCENFILES" ] || \
364 {
365 echo "FATAL: missing scenario file $SCENFILES"
366 exit 1
367 }
368
369 cat $SCENFILES >> ${TMP}/alltests || \
370 {
371 echo "FATAL: unable to create command file"
372 exit 1
373 }
374 done
subrata_modakbc833d32007-07-25 10:12:02 +0000375 fi
376
377 [ -n "$CMDFILES" ] && \
378 {
379 for SCENFILES in `echo "$CMDFILES" | sed 's/,/\n/g'`
380 do
381 [ -f "$SCENFILES" ] || SCENFILES="$LTPROOT/runtest/$SCENFILES"
382 cat "$SCENFILES" >> ${TMP}/alltests || \
383 {
384 echo "FATAL: unable to create command file"
385 exit 1
386 }
387 done
388 }
389
390 [ -n "$CMDFILEADDR" ] && \
391 {
392 wget -q "${CMDFILEADDR}" -O ${TMP}/wgetcmdfile
393 if [ $? -ne 0 ]; then
394 echo "FATAL: error while getting the command file with wget (address $CMDFILEADDR)"
395 exit 1
396 fi
397 cat "${TMP}/wgetcmdfile" >> ${TMP}/alltests || \
plars4a120e82004-09-02 18:56:06 +0000398 {
subrata_modakbc833d32007-07-25 10:12:02 +0000399 echo "FATAL: unable to create command file"
plars4a120e82004-09-02 18:56:06 +0000400 exit 1
401 }
subrata_modakbc833d32007-07-25 10:12:02 +0000402 }
403
plars4a120e82004-09-02 18:56:06 +0000404 [ "$RUN_NETEST" -eq 1 ] && \
405 {
406 for SCENFILES in ${LTPROOT}/runtest/tcp_cmds \
407 ${LTPROOT}/runtest/multicast \
408 ${LTPROOT}/runtest/rpc \
409 ${LTPROOT}/runtest/nfs
410 do
411 [ -a "$SCENFILES" ] || \
412 {
413 echo "FATAL: missing scenario file $SCENFILES"
414 exit 1
415 }
416
subrata_modakbc833d32007-07-25 10:12:02 +0000417 cat "$SCENFILES" >> ${TMP}/alltests || \
plars4a120e82004-09-02 18:56:06 +0000418 {
419 echo "FATAL: unable to create command file"
420 exit 1
421 }
422 done
423 }
subrata_modakbc833d32007-07-25 10:12:02 +0000424
plars4a120e82004-09-02 18:56:06 +0000425 # The fsx-linux tests use the SCRATCHDEV environment variable as a location
426 # that can be reformatted and run on. Set SCRATCHDEV if you want to run
427 # these tests. As a safeguard, this is disabled.
428 unset SCRATCHDEV
429 [ -n "$SCRATCHDEV" ] && \
430 {
431 cat ${LTPROOT}/runtest/fsx >> ${TMP}/alltests ||
432 {
433 echo "FATAL: unable to create fsx-linux tests command file"
434 exit 1
435 }
436 }
subrata_modakbc833d32007-07-25 10:12:02 +0000437
438 # If enabled, execute only test cases that match the PATTERN
439 if [ -n "$TAG_RESTRICT_STRING" ]
440 then
441 mv -f ${TMP}/alltests ${TMP}/alltests.orig
442 grep $TAG_RESTRICT_STRING ${TMP}/alltests.orig > ${TMP}/alltests #Not worth checking return codes for this case
443 fi
plars4a120e82004-09-02 18:56:06 +0000444
445 # check for required users and groups
446 ${LTPROOT}/IDcheck.sh &>/dev/null || \
447 {
448 echo "WARNING: required users and groups not present"
449 echo "WARNING: some test cases may fail"
450 }
robbiew7d43d772005-02-07 20:07:30 +0000451
plars4a120e82004-09-02 18:56:06 +0000452 # display versions of installed software
453 [ -z "$QUIET_MODE" ] && \
454 {
455 ${LTPROOT}/ver_linux || \
456 {
457 echo "WARNING: unable to display versions of software installed"
458 exit 1
459 }
460 }
461
462 [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test start time: $(date)" ; }
robbiew7d43d772005-02-07 20:07:30 +0000463 PAN_COMMAND="${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ \
subrata_modakbc833d32007-07-25 10:12:02 +0000464 -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE"
robbiew7d43d772005-02-07 20:07:30 +0000465 if [ ! -z "$VERBOSE_MODE" ] ; then
466 echo "COMMAND: $PAN_COMMAND"
467 if [ ! -z "$TAG_RESTRICT_STRING" ] ; then
468 echo "INFO: Restricted to $TAG_RESTRICT_STRING"
469 fi
470 fi
471 #$PAN_COMMAND #Duplicated code here, because otherwise if we fail, only "PAN_COMMAND" gets output
plars4a120e82004-09-02 18:56:06 +0000472 ${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ \
subrata_modakbc833d32007-07-25 10:12:02 +0000473 -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE
plars4a120e82004-09-02 18:56:06 +0000474
475 if [ $? -eq 0 ]; then
476 echo "INFO: pan reported all tests PASS"
477 VALUE=0
478 else
479 echo "INFO: pan reported some tests FAIL"
480 VALUE=1
481 fi
mreed1091696422006-05-03 19:07:22 +0000482 echo "LTP Version: $version_date"
483
plars4a120e82004-09-02 18:56:06 +0000484 [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test end time: $(date)" ; }
485
486 [ "$GENLOAD" -eq 1 ] && { killall -9 genload ; }
487 [ "$NETPIPE" -eq 1 ] && { killall -9 NPtcp ; }
488
subrata_modak5d7deea2007-09-15 13:51:36 +0000489 [ "$ALT_DIR_OUT" -eq 1 ] || [ "$ALT_DIR_RES" -eq 1 ] && \
plars4a120e82004-09-02 18:56:06 +0000490 {
491 cat <<-EOF >&1
492
493 ###############################################################"
494
495 Done executing testcases."
subrata_modak6838ec32007-09-14 10:10:12 +0000496 log result(s) is in $LTPROOT/results directory"
497 output/failed result(s) in $LTPROOT/output directory [If you did not provide Absolute Path]
mreed1091696422006-05-03 19:07:22 +0000498 LTP Version: $version_date
plars4a120e82004-09-02 18:56:06 +0000499 ###############################################################"
500
501 EOF
502 }
503 exit $VALUE
504}
505
506cleanup()
507{
508 rm -rf ${TMP}
509}
510
511trap "cleanup" 0
512setup
513main "$@"