Hi, I've been working on adding valgrind support for the existing test cases and I started with runlibcgrouptest.sh. We need to integrate the individual test cases in the same script, but that is a TODO still pending for later.
Comments? Signed-off-by: Balbir Singh <[email protected]> --- diff --git a/tests/Makefile.am b/tests/Makefile.am index b88688b..f0aaec1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -19,3 +19,10 @@ get_all_controller_SOURCES=get_all_controller.c EXTRA_DIST = pathtest.sh runlibcgrouptest.sh TESTS = runlibcgrouptest.sh + +valgrind: + $(MAKE) CHECKER='valgrind --quiet --leak-check=full --trace-children=yes' tests + +tests: $(noinst_PROGRAMS) + @(./runlibcgrouptest.sh $(CHECKER)) + diff --git a/tests/runlibcgrouptest.sh b/tests/runlibcgrouptest.sh index 847f932..275492b 100755 --- a/tests/runlibcgrouptest.sh +++ b/tests/runlibcgrouptest.sh @@ -299,7 +299,7 @@ runtest() TEST_EXEC=$2; if [ -f $TEST_EXEC ] then - ./$TEST_EXEC $MOUNT_INFO $ctl1 $ctl2 ${target[1]} ${target[2]}; + $CHECKER ./$TEST_EXEC $MOUNT_INFO $ctl1 $ctl2 ${target[1]} ${target[2]}; if [ $? -ne 0 ] then echo Error in running ./$TEST_EXEC @@ -332,6 +332,14 @@ runtest() exit $SKIP_TEST fi + # + # Do we run under a checker, valgrind, sparse, etc? + # + case $# in + $1) CHECKER=$1 + ;; + esac + # TestSet01: Run tests without mounting cgroup filesystem echo; echo Running first set of testcases; -- Balbir ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
