From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: LTP Mailing List <ltp-list@lists.sourceforge.net>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>,
Mike Frysinger <vapier@gentoo.org>,
Michael Reed <mreed10@us.ibm.com>, Nate Straz <nate@refried.org>,
Paul Larson <paul.larson@ubuntu.com>,
Manoj Iyer <manoj.iyer@ubuntu.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: [LTP] [PATCH 01/02] Create the necessary Interface with runltp
Date: Mon, 24 Aug 2009 15:02:35 +0530 [thread overview]
Message-ID: <20090824093224.31997.5188.sendpatchset@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <20090824093204.31997.18175.sendpatchset@subratamodak.linux.ibm.com>
Introducing a new Option "-M" in LTP, which will take 1 argument of the type
of Checks that you would need to do for the LTP tests. Even, if you would like
to use these check options, it internally checks whether the desired tool
is available on your machine. It goes ahead and then does the necessary checks
on your tests. One limitation is that if you choose both the "Fault Injection"
and "Memory Leak Checks" simultaneously, then "Memory Leak Checks" will not work,
as we would not like to test how "Fault Injection" works when "Valgrind" is
running.
Signed-off-by: Subrata Modak<subrata@linux.vnet.ibm.com>
---
--- ltp-full-20090731.orig/runltp 2009-08-23 23:02:34.000000000 +0530
+++ ltp-full-20090731/runltp 2009-08-24 12:15:20.000000000 +0530
@@ -138,6 +138,10 @@ usage()
[CHUNKS = malloc these many chunks (default is 1 when value 0 or undefined)]
[BYTES = malloc CHUNKS of BYTES bytes (default is 256MB when value 0 or undefined) ]
[HANGUP_FLAG = hang in a sleep loop after memory allocated, when value 1]
+ -M CHECK_TYPE
+ [CHECK_TYPE=1 => Full Memory Leak Check tracing children as well]
+ [CHECK_TYPE=2 => Thread Concurrency Check tracing children as well]
+ [CHECK_TYPE=3 => Full Memory Leak & Thread Concurrency Check tracing children as well]
-N Run all the networking tests.
-n Run LTP with network traffic in background.
-o OUTPUTFILE Redirect test output to a file.
@@ -188,6 +192,8 @@ main()
local INJECT_KERNEL_FAULT=""
local INJECT_KERNEL_FAULT_PERCENTAGE=""
local INJECT_FAULT_LOOPS_PER_TEST=""
+ local VALGRIND_CHECK=""
+ local VALGRIND_CHECK_TYPE=""
local LOGFILE_NAME=""
local LOGFILE=""
local OUTPUTFILE_NAME=""
@@ -201,7 +207,7 @@ main()
local DEFAULT_FILE_NAME_GENERATION_TIME=`date +"%Y_%b_%d-%Hh_%Mm_%Ss"`
version_date=`head -n 1 $LTPROOT/ChangeLog`
- while getopts a:c:C:d:D:f:F:ehi:g:l:m:Nno:pqr:s:S:t:T:vw:x:b:B: arg
+ while getopts a:c:C:d:D:f:F:ehi:g:l:m:M:Nno:pqr:s:S:t:T:vw:x:b:B: arg
do case $arg in
a) EMAIL_TO=$OPTARG
ALT_EMAIL_OUT=1;;
@@ -350,7 +356,10 @@ main()
$CHUNKS --vm-bytes $BYTES >/dev/null 2>&1 &
fi
GENLOAD=1;;
-
+ M)
+ VALGRIND_CHECK=1
+ VALGRIND_CHECK_TYPE="$OPTARG";;
+
N) RUN_NETEST=1;;
n)
@@ -774,7 +783,7 @@ main()
test_start_time=$(date)
# User wants testing with Kernel Fault Injection
- if [ $INJECT_KERNEL_FAULT -eq 1 ] ; then
+ if [ $INJECT_KERNEL_FAULT ] ; then
#See if Debugfs is mounted, and
#Fault Injection Framework available through Debugfs
if [ -d "/sys/kernel/debug/fail_io_timeout" -o \
@@ -795,6 +804,29 @@ main()
fi
fi
+ ## Valgrind Check will work only when Kernel Fault Injection is not expected,
+ ## We do not want to test Faults when valgrind is running
+ if [ $VALGRIND_CHECK ]; then
+ if [ ! $INJECT_KERNEL_FAULT ]; then
+ which valgrind || VALGRIND_CHECK_TYPE=XYZ
+ case $VALGRIND_CHECK_TYPE in
+ 1)
+ ${LTPROOT}/tools/create_valgrind_check.pl ${TMP}/alltests 1 > ${TMP}/alltests.tmp
+ cp ${TMP}/alltests.tmp ${TMP}/alltests
+ rm -rf ${TMP}/alltests.tmp;;
+ 2)
+ ${LTPROOT}/tools/create_valgrind_check.pl ${TMP}/alltests 2 > ${TMP}/alltests.tmp
+ cp ${TMP}/alltests.tmp ${TMP}/alltests
+ rm -rf ${TMP}/alltests.tmp;;
+ 3)
+ ${LTPROOT}/tools/create_valgrind_check.pl ${TMP}/alltests 3 > ${TMP}/alltests.tmp
+ cp ${TMP}/alltests.tmp ${TMP}/alltests
+ rm -rf ${TMP}/alltests.tmp;;
+ *) echo "Invalid Memory Check Type, or, Valgrind is not available";;
+ esac
+ fi
+ fi
+
# Some tests need to run inside the "bin" directory.
cd "${LTPROOT}/testcases/bin"
${LTPROOT}/pan/ltp-pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE
---
Regards--
Subrata
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-08-24 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 9:32 [LTP] [PATCH 00/02] Integrate Valgrind Memory Check Tool to LTP Subrata Modak
2009-08-24 9:32 ` Subrata Modak [this message]
2009-08-24 9:32 ` [LTP] [PATCH 02/02] Script that will actually create the COMMAND File entries Subrata Modak
2009-08-24 9:33 ` [LTP] [RESULTS] The Actual results of the tests run with the new interface Subrata Modak
2009-08-24 12:47 ` [LTP] [PATCH 00/02] Integrate Valgrind Memory Check Tool to LTP Paul Larson
2009-08-25 10:12 ` Subrata Modak
2009-08-25 21:22 ` Paul Larson
2009-08-26 2:09 ` Garrett Cooper
2009-08-26 7:11 ` Subrata Modak
2009-08-26 7:11 ` Subrata Modak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090824093224.31997.5188.sendpatchset@subratamodak.linux.ibm.com \
--to=subrata@linux.vnet.ibm.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=manoj.iyer@ubuntu.com \
--cc=mreed10@us.ibm.com \
--cc=nate@refried.org \
--cc=paul.larson@ubuntu.com \
--cc=sachinp@linux.vnet.ibm.com \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox