Jin,

On Tue, 2008-08-26 at 14:56 +0800, Jin Bing Guo wrote:
> In testcases/kernel/sched/tool/time-schedule, it used kill(0, SIGTERM)
> to terminate the all the processes in the group.
> However, the progress group leader might be different regarding the
> different call methods. 
> 
> In interactive call such as pan, it called time-schedule by exec() and
> setpgrp() as a child process. The time-schedule process would be the
> process group leader and all the child processes created by it had the
> same PGID. So the SIGTERM was sent to process group and the exit code
> got by pan was 0.
> 
> In non-inactive call such as STAF/STAX, one shell script called the
> time-schedule directly. The shell script would be the process group
> leader. So the SIGTERM was also sent to the shell script and the exit
> code got by STAF/STAX was 143 (128+15).

Thanks for pointing that out. Yes, i also see that behaviour and it goes
off after applying that Patch. See the Results below:

$./time-schedule
Not running with RT priority!
Started 0 hog processes
Syscall overhead: 1.3 us
Num switches during overhead check: 0
Minimum scheduling latency: 0.3 (-1.0) us
Median scheduling latency:  0.7 (214748364.2) us
Average scheduling latency: 0.6 (-0.7) us
Maximum scheduling latency: 1.6 (0.3) us
Run queue size: 2, 2
Num switches: 68
Number of yields: 31799

$ echo $?
0

This Patch is merged.

Regards--
Subrata

> 
> For example:
> ========================
> Run time-schedule by pan
> ========================
> <<<test_start>>>
> tag=time-schedule01 stime=1219721252
> cmdline=" time-schedule"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> Started 0 hog processes
> Syscall overhead: 0.9 us
> Number of yields: 21725
> Num switches during overhead check: 0
> Minimum scheduling latency: 0.4 (-0.5) us
> Median scheduling latency:  0.5 (214748364.3) us
> Average scheduling latency: 0.9 (0.0) us
> Maximum scheduling latency: 251.6 (250.7) us
> Run queue size: 2, 2
> Num switches: 4
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=0 corefile=no
> cutime=1 cstime=1
> <<<test_end>>>
> 
> ======================
> Run time-schedule by a.sh
> ======================
> # cat a.sh
> #!/bin/sh
> ./time-schedule
> 
> # ./a.sh
> Started 0 hog processes
> Syscall overhead: 0.9 us
> Num switches during overhead check: 0
> Minimum scheduling latency: 0.4 (-0.5) us
> Number of yields: 18849
> Median scheduling latency:  0.5 (214748364.3) us
> Average scheduling latency: 0.6 (-0.3) us
> Maximum scheduling latency: 145.8 (144.9) us
> Run queue size: 2, 2
> Num switches: 5
> Terminated
> # echo $?
> 143
> 
> 
> This patch can resolve this problem.
> 
> Signed-off-by: Lin Feng Shen <[EMAIL PROTECTED]>
> Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
> ------------
> 
> --- cvs_ltp.orig/testcases/kernel/sched/tool/time-schedule.c
> 2008-06-03 09:53:44.000000000 -0500
> +++ cvs_ltp/testcases/kernel/sched/tool/time-schedule.c 2008-08-25
> 05:17:13.000000000 -0500
> @@ -112,7 +112,8 @@ int main (int argc, char **argv)
> sigset_t set;
> static char *usage =
> "time-schedule [-h] [-thread] [-notest] [-pipe] [-fpu] [num_running]";
> -
> + 
> + setpgrp();
> /* First create pipe used to sychronise low priority processes */
> if (pipe (fds) != 0)
> {
> 
> 
> (See attached file: Fix_PGID_time-schedule.patch)
> 
> Best regards!
> 
> Jin Bing Guo 郭晋兵
> 
> Linux for System p Test
> IBM China Systems & Technology Laboratory in Beijing
> Tel: +86-10-82454439 
> Email: [EMAIL PROTECTED]
> -------------------------------------
> "Do today what others won't so tomorrow you do what other's can't" 
> 
> 
> 
> -------------------------------------------------------------------------
> 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


-------------------------------------------------------------------------
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