On Fri, 2008-11-21 at 17:25 +0530, [EMAIL PROTECTED] wrote:
> plain text document attachment
> (add-default-task-support-in-script-for-fourth-test.patch)
> This patch modifies the script to run the default task for test 4.
> 
> Signed-off-by: Sudhir Kumar <[EMAIL PROTECTED]>

Thanks.

Regards--
Subrata

> 
> ---
>  testcases/kernel/controllers/cpuctl/parameters.sh      |    3 +-
>  testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh |   21 
> +++++++++++++++++
>  2 files changed, 23 insertions(+), 1 deletion(-)
> 
> Index: 
> ltp-full-20081031/testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh
> ===================================================================
> --- 
> ltp-full-20081031.orig/testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh
> +++ ltp-full-20081031/testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh
> @@ -153,7 +153,7 @@ NUM_CPUS=`cat /proc/cpuinfo | grep -w pr
>               echo `date` >> $LTPROOT/output/cpuctl_results_$FILE.txt;
>               echo `uname -a` >> $LTPROOT/output/cpuctl_results_$FILE.txt;
>               echo TEST:- $TEST_NAME $TEST_NUM >> 
> $LTPROOT/output/cpuctl_results_$FILE.txt;
> -             echo NUM_GROUPS=$NUM_GROUPS >> 
> $LTPROOT/output/cpuctl_results_$FILE.txt;
> +             echo NUM_GROUPS=$NUM_GROUPS +1 \(DEF\) >> 
> $LTPROOT/output/cpuctl_results_$FILE.txt;
>               for i in $(seq 1 $NUM_GROUPS)
>               do
>                       MYGROUP=/dev/cpuctl/group_$i
> @@ -191,6 +191,27 @@ NUM_CPUS=`cat /proc/cpuinfo | grep -w pr
>                       exit -1;
>               fi;
>               TOTAL_TASKS=$TASK_NUM;
> +
> +             # Run the default task in a default group
> +             set_def_group;
> +             if [ ! -f cpuctl_def_task02 ]; then
> +                     echo "Source file for default task not compiled";
> +                     echo "Plz check Makefile...Exiting test";
> +                     cleanup;
> +                     exit -1;
> +             fi
> +             MYGROUP=/dev/cpuctl/group_def ;
> +             GROUP_NUM=0 MYGROUP=$MYGROUP SCRIPT_PID=$SCRIPT_PID \
> +             NUM_CPUS=$NUM_CPUS TEST_NUM=$TEST_NUM TASK_NUM=0 \
> +             ./cpuctl_def_task02 >>$LTPROOT/output/cpuctl_results_$FILE.txt &
> +             if [ $? -ne 0 ]
> +             then
> +                     echo "Error: Could not run ./cpuctl_def_task02"
> +                     cleanup;
> +                     exit -1;
> +             else
> +                     echo "Succesfully launched def task $! too";
> +             fi
>               ;;
>       "5" )
>               if [ -f cpuctl_test02 ]
> Index: ltp-full-20081031/testcases/kernel/controllers/cpuctl/parameters.sh
> ===================================================================
> --- ltp-full-20081031.orig/testcases/kernel/controllers/cpuctl/parameters.sh
> +++ ltp-full-20081031/testcases/kernel/controllers/cpuctl/parameters.sh
> @@ -77,7 +77,8 @@ get_num_groups()        # Number of task
>  cleanup ()
>  {
>          echo "Cleanup called";
> -     killall cpuctl_def_task01;
> +     killall cpuctl_def_task01 1>/dev/null 2>&1;
> +     killall cpuctl_def_task02 1>/dev/null 2>&1;
>          rm -f cpuctl_task_* 2>/dev/null
>       for task in `cat /dev/cpuctl/group_def/tasks`; do
>               echo $task > /dev/cpuctl/tasks 2>/dev/null 1>&2;
> 
> 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to