On 05/16/2011 11:05 PM, Caspar Zhang wrote: > > getrusage03 - test ru_maxrss behaviors in struct rusage > > This test program is backported from upstream commit: > 1f10206cf8e945220f7220a809d8bfc15c21f9a5, which fills ru_maxrss > value in struct rusage according to rss hiwater mark. To make sure > this feature works correctly, a series of tests are executed in > this program. > > Signed-off-by: Caspar Zhang <[email protected]> > --- > runtest/syscalls | 1 + > testcases/kernel/syscalls/getrusage/child.c | 165 ++++++++++ > testcases/kernel/syscalls/getrusage/getrusage03.c | 341 > +++++++++++++++++++++ > 3 files changed, 507 insertions(+), 0 deletions(-) > create mode 100644 testcases/kernel/syscalls/getrusage/child.c > create mode 100644 testcases/kernel/syscalls/getrusage/getrusage03.c >
PASS/FAIL Criteria ================== This test PASS when all sub-tests executed successfully and return code is 0. The test gets FAIL when any TFAIL/TBROK information occurs on output or/and the return code is a non-zero value. EXAMPLE OUTPUT ============== getrusage03 0 TINFO : allocate 100MB getrusage03 0 TINFO : Testcase #01: fork inherit getrusage03 0 TINFO : initial.self = 108456 child_proc 0 TINFO : child.self = 103632 getrusage03 1 TPASS : initial.self ~= child.self getrusage03 0 TINFO : Testcase #02: fork inherit(cont.) getrusage03 0 TINFO : initial.children = 105244 getrusage03 2 TPASS : initial.children ~= 100MB child_proc 0 TINFO : child.children = 0 getrusage03 3 TPASS : child.children == 0 getrusage03 0 TINFO : Testcase #03: fork + malloc getrusage03 0 TINFO : initial.self = 108716 child_proc 0 TINFO : child allocate +50MB child_proc 0 TINFO : child.self = 154744 getrusage03 4 TPASS : initial.self + 50MB ~= child.self getrusage03 0 TINFO : Testcase #04: grandchild maxrss getrusage03 0 TINFO : initial.children = 156460 child_proc 0 TINFO : grandchild allocate 300MB getrusage03 0 TINFO : post_wait.children = 310028 getrusage03 5 TPASS : child.children ~= 300MB getrusage03 0 TINFO : Testcase #05: zombie getrusage03 0 TINFO : initial.children = 310028 child_proc 0 TINFO : child allocate 400MB getrusage03 0 TINFO : pre_wait.children = 310028 getrusage03 6 TPASS : initial.children ~= pre_wait.children getrusage03 0 TINFO : post_wait.children = 415972 getrusage03 7 TPASS : post_wait.children ~= 400MB getrusage03 0 TINFO : Testcase #06: SIG_IGN getrusage03 0 TINFO : initial.children = 415972 child_proc 0 TINFO : child allocate 500MB getrusage03 0 TINFO : after_zombie.children = 415972 getrusage03 8 TPASS : initial.children ~= after_zombie.children getrusage03 0 TINFO : Testcase #07: exec without fork getrusage03 0 TINFO : initial.self = 108720, initial.children = 415972 child_proc 0 TINFO : exec.self = 108732, exec.children = 415972 child_proc 1 TPASS : initial.self ~= exec.self child_proc 2 TPASS : initial.children ~= exec.children # echo $? 0 ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
