All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caspar Zhang <czhang@redhat.com>
To: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] [syscalls] getrusage03: test ru_maxrss
Date: Mon, 16 May 2011 23:08:43 +0800	[thread overview]
Message-ID: <4DD13DFB.3060505@redhat.com> (raw)
In-Reply-To: <4b2e0e53cb8ba5934df4fa72055d1d29746bffa2.1305557863.git.czhang@redhat.com>

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 <czhang@redhat.com>
> ---
>  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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2011-05-16 15:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 15:05 [LTP] [PATCH] [syscalls] getrusage03: test ru_maxrss Caspar Zhang
2011-05-16 15:08 ` Caspar Zhang [this message]
2011-05-19 17:40 ` Cyril Hrubis
     [not found]   ` <BANLkTi=m96RBZeFuRaOA5Sb_QANhgo4yCA@mail.gmail.com>
2011-05-20 13:29     ` Cyril Hrubis
2011-06-13 13:12 ` [LTP] [PATCH v2] " Caspar Zhang
2011-06-29 14:14   ` Cyril Hrubis
2011-06-29 15:36   ` [LTP] [PATCH v3] " Caspar Zhang
2011-06-29 17:46     ` Cyril Hrubis
2011-06-29 17:50     ` [LTP] [PATCH v4] " Caspar Zhang
2011-07-11 13:16       ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD13DFB.3060505@redhat.com \
    --to=czhang@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.