Thanks a lot for coming out with this patch so soon.
Jeff,
Can you verify whether it solves your problem and you are getting what
you expected ?
--Subrata
On Tue, 2008-01-08 at 16:08 +0530, sudhanshu wrote:
> Realtime tests, earlier maintained by IBM-realtime team is now integrated to
> LTP off december release.
>
> There were certain issue seen with running realtime-tests smoothly through
> LTP.
> Major issues seen are :
>
> 1. realtime tests log their output in testcases/realtime/logs directory by
> default.This directory was missing in the tree.
> 2. testscripts/realtime.sh doesn't have execute permission by default.
>
> This patch deals these issues by creating a new run script (
> test_realtime.sh)
> and this script will create log directory for logging results.
>
> Patch is tested on realtime and non-realtime kernels and it works fine.
>
> Tests are happily building and running on any of the kernel.However , tests
> will end-up outputting 'FAIL' on a non-realtime kernel ( obviously).
>
> Sample output of one of the testcase ( sched_latency ) on non-realtime kernel
> is like :
>
> Start: 81 us: PASS
> Min: 30 us: PASS
> Max: 1962 us: FAIL
> Avg: 1022 us: FAIL
> StdDev: 358.0536 us
> Quantiles:
> 99.0% < 0
> 99.9% < 0
> 99.99% < 0
> Failed Iterations: 9960
>
> while on realtime kernel its output is :
>
> Start: 79 us: PASS
> Min: 8 us: PASS
> Max: 15 us: PASS
> Avg: 8 us: PASS
> StdDev: 0.1912 us
> Quantiles:
> 99.0% < 0
> 99.9% < 0
> 99.99% < 0
> Failed Iterations: 0
>
>
> PATCH :
>
> Signed-off-by : Sudhanshu Singh <[EMAIL PROTECTED]>
>
> Index: ltp-full-20071231/testscripts/test_realtime.sh
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ ltp-full-20071231/testscripts/test_realtime.sh 2008-01-08
> 14:52:46.000000000 +0530
> @@ -0,0 +1,148 @@
> +#! /bin/bash
> +#
> +# Script to run the tests in testcases/realtime
> +#
> +# Usage: $0 test_argument
> +#
> +# where test-argument = func | stress | perf | all | list | clean | test_name
> +#
> +# test_name is the name of a subdirectory in func/, stress/ or perf/
> +#
> +echo "Real-time tests run"
> +
> +export LTPROOT=${PWD}
> +echo $LTPROOT | grep testscripts > /dev/null 2>&1
> +if [ $? -eq 0 ]; then
> + cd ..
> + export LTPROOT=${PWD}
> +fi
> +
> +
> +function usage()
> +{
> + echo -e "\nUsage: $0 test-argument"
> + echo -e "\nWhere test-argument = func | stress | perf | all | list |
> clean |
> test_name"
> + echo -e "\nand:\n"
> + echo -e " func = all functional tests will be run "
> + echo -e " stress = all stress tests will be run "
> + echo -e " perf = all perf tests will be run "
> + echo -e " all = all tests will be run "
> + echo -e " list = all available tests will be listed "
> + echo -e " clean = all logs deleted, make clean performed "
> + echo -e " test_name = only test_name subdir will be run (e.g:
> func/pi-tests) "
> + echo -e "\n"
> + exit 1;
> +}
> +
> +list_tests()
> +{
> + echo -e "\nAvailable tests are:\n"
> +
> + cd $TESTS_DIR
> + for file in `find -name run_auto.sh`
> + do
> + echo -e " `dirname $file `"
> + done
> + echo -e " \n"
> +}
> +
> +function run_test()
> +{
> + if [ -d "$test" ]; then
> + cd $test
> + if [ -f "run_auto.sh" ]; then
> + ./run_auto.sh
> + else
> + echo -e "\n Failed to find run script in $test \n"
> + fi
> + cd $TESTS_DIR
> + else
> + echo -e "\n $test is not a valid test subdirectory\n"
> + usage
> + exit 1
> + fi
> +}
> +
> +function make_clean()
> +{
> + cd $TESTS_DIR
> + rm -rf logs/*
> + for mfile in `find -name "Makefile"`;
> + do
> + target_dir=`dirname $mfile`
> + cd $target_dir
> + make clean
> + cd $TESTS_DIR
> + done
> +}
> +
> +source $LTPROOT/testcases/realtime/scripts/setenv.sh
> +
> +if [ $# -ne 1 ]; then
> + usage
> +fi
> +
> +cd $TESTS_DIR
> +if [ ! -e "logs" ]; then
> + mkdir logs
> + echo " creating logs directory as $TESTS_DIR/logs "
> + chmod -R 775 logs
> +fi
> +
> +if [ ! -e "config/m4" ]; then
> + mkdir config/m4
> + chmod -R 775 config/m4
> +fi
> +
> +rm -fr func/vstnm
> +
> +./autogen.sh
> +./configure
> +make
> +
> +
> +case $1 in
> + func)
> + TESTLIST="func"
> + ;;
> + stress)
> + TESTLIST="stress"
> + ;;
> + perf)
> + TESTLIST="perf"
> + ;;
> + all)
> + # Run all tests which have run_auto.sh
> + TESTLIST="func stress perf"
> + ;;
> + list)
> + # This will only display subdirs which have run_auto.sh
> + list_tests
> + exit
> + ;;
> + clean)
> + # This will clobber logs, out files, .o's etc
> + make_clean
> + exit
> + ;;
> + *)
> + # run the tests in the individual subdirectory if it exists
> + TESTLIST="$1"
> + ;;
> +esac
> +
> +for subdir in $TESTLIST
> +do
> + if [ -d $subdir ]; then
> + cd $subdir
> + for name in `find -name "run_auto.sh"`
> + do
> + test="`dirname $name`"
> + run_test $test
> + cd $subdir
> + done
> + cd $TESTS_DIR
> + else
> + echo -e "\n $subdir not found; check name/path with run.sh
> list\n"
> + fi
> +done
> Index: ltp-full-20071231/testscripts/realtime.sh
> ===================================================================
> --- ltp-full-20071231.orig/testscripts/realtime.sh 2008-01-01
> 17:15:40.000000000 +0530
> +++ /dev/null 1970-01-01 00:00:00.000000000 +0000
> @@ -1,135 +0,0 @@
> -#! /bin/bash
> -#
> -# Script to run the tests in testcases/realtime
> -#
> -# Usage: $0 test_argument
> -#
> -# where test-argument = func | stress | perf | all | list | clean | test_name
> -#
> -# test_name is the name of a subdirectory in func/, stress/ or perf/
> -#
> -echo "Real-time tests run"
> -
> -export LTPROOT=${PWD}
> -echo $LTPROOT | grep testscripts > /dev/null 2>&1
> -if [ $? -eq 0 ]; then
> - cd ..
> - export LTPROOT=${PWD}
> -fi
> -
> -
> -function usage()
> -{
> - echo -e "\n Usage: $0 test-argument "
> - echo -e "\n Where test-argument = func | stress | perf | all | list |
> clean | test_name"
> - echo -e "\n and: \n"
> - echo -e " func = all functional tests will be run "
> - echo -e " stress = all stress tests will be run "
> - echo -e " perf = all perf tests will be run "
> - echo -e " all = all tests will be run "
> - echo -e " list = all available tests will be listed "
> - echo -e " clean = all logs deleted, make clean performed "
> - echo -e " test_name = only test_name subdir will be run (e.g:
> func/pi-tests) "
> - echo -e "\n"
> - exit 1;
> -}
> -
> -list_tests()
> -{
> - echo -e "\n Available tests are:\n"
> -
> - cd $TESTS_DIR
> - for file in `find -name run_auto.sh`
> - do
> - echo -e " `dirname $file `"
> - done
> - echo -e " \n"
> -}
> -
> -function run_test()
> -{
> - if [ -d "$test" ]; then
> - cd $test
> - if [ -f "run_auto.sh" ]; then
> - ./run_auto.sh
> - else
> - echo -e "\n Failed to find run script in $test \n"
> - fi
> - cd $TESTS_DIR
> - else
> - echo -e "\n $test is not a valid test subdirectory "
> - usage
> - exit 1
> - fi
> -}
> -
> -function make_clean()
> -{
> - cd $TESTS_DIR
> - rm -rf logs/*
> - for mfile in `find -name "Makefile"`;
> - do
> - target_dir=`dirname $mfile`
> - cd $target_dir
> - make clean
> - cd $TESTS_DIR
> - done
> -}
> -
> -source $LTPROOT/testcases/realtime/scripts/setenv.sh
> -
> -if [ $# -ne 1 ]; then
> - usage
> -fi
> -
> -cd $TESTS_DIR
> -./autogen.sh
> -./configure
> -make
> -
> -
> -case $1 in
> - func)
> - TESTLIST="func"
> - ;;
> - stress)
> - TESTLIST="stress"
> - ;;
> - perf)
> - TESTLIST="perf"
> - ;;
> - all)
> - # Run all tests which have run_auto.sh
> - TESTLIST="func stress perf"
> - ;;
> - list)
> - # This will only display subdirs which have run_auto.sh
> - list_tests
> - exit
> - ;;
> - clean)
> - # This will clobber logs, out files, .o's etc
> - make_clean
> - exit
> - ;;
> - *)
> - # run the tests in the individual subdirectory if it exists
> - TESTLIST="$1"
> - ;;
> -esac
> -
> -for subdir in $TESTLIST
> -do
> - if [ -d $subdir ]; then
> - cd $subdir
> - for name in `find -name "run_auto.sh"`
> - do
> - test="`dirname $name`"
> - run_test $test
> - cd $subdir
> - done
> - cd $TESTS_DIR
> - else
> - echo -e "\n $subdir not found; check name/path with run.sh
> list "
> - fi
> -done
> Index: ltp-full-20071231/testcases/realtime/README
> ===================================================================
> --- ltp-full-20071231.orig/testcases/realtime/README 2008-01-01
> 17:14:39.000000000 +0530
> +++ ltp-full-20071231/testcases/realtime/README 2008-01-08
> 14:59:26.000000000
> +0530
> @@ -35,6 +35,31 @@
> this version and autoconf-2.61.
>
>
> +RUNNING TESTS THROUGH LTP
> +=========================
> +Simplest method to run realtime tests through LTP is:
> +The command will configure,build and run tests specified through
> +argument provided to the script.
> +
> +Run command below from LTP root directory with argument:
> +
> + $./testscripts/test_realtime.sh $arg
> +
> + or
> +
> + $./test_realtime.sh $arg # From $LTPROOT/testscripts directory
> +
> +Here $arg takes values as :
> +
> + func = all functional tests will be run "
> + stress = all stress tests will be run "
> + perf = all perf tests will be run "
> + all = all tests will be run "
> + list = all available tests will be listed "
> + clean = all logs deleted, make clean performed "
> + test_name = only test_name subdir will be run (e.g:
> func/pi-tests) "
> +
> +
> BUILD
> =====
> As of April 2007, we include autoconf support (based on Robert
> ============================================
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list