public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] getrusage04: initialise [us]last to current values
@ 2012-03-07 15:51 Jan Stancek
  2012-03-08  2:48 ` Caspar Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Stancek @ 2012-03-07 15:51 UTC (permalink / raw)
  To: ltp-list; +Cc: Jeffrey Burke

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]


On slower machines, startup can take some time,
set last values to current [us]time before actual test.

This caused test to fail, because first delta contained
time spent by test starting up:
getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
getrusage04    1  TFAIL  :  stime increased > 1000us: delta = 6998us

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
  testcases/kernel/syscalls/getrusage/getrusage04.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)



[-- Attachment #2: 0001-getrusage04-initialise-us-last-to-current-values.patch --]
[-- Type: text/x-patch, Size: 758 bytes --]

diff --git a/testcases/kernel/syscalls/getrusage/getrusage04.c b/testcases/kernel/syscalls/getrusage/getrusage04.c
index e142d22..9801192 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage04.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage04.c
@@ -100,10 +100,12 @@ int main(int argc, char *argv[])
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0; i = 0;
-		ulast = 0, slast = 0;
 		SAFE_GETRUSAGE(cleanup, RUSAGE_THREAD, &usage);
 		tst_resm(TINFO, "utime:%12luus; stime:%12luus",
 			usage.ru_utime.tv_usec, usage.ru_stime.tv_usec);
+		ulast = usage.ru_utime.tv_usec;
+		slast = usage.ru_stime.tv_usec;
+
 		while (i < RECORD_MAX) {
 			SAFE_GETRUSAGE(cleanup, RUSAGE_THREAD, &usage);
 			udelta = usage.ru_utime.tv_usec - ulast;


[-- Attachment #3: Type: text/plain, Size: 317 bytes --]

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] getrusage04: initialise [us]last to current values
  2012-03-07 15:51 [LTP] [PATCH] getrusage04: initialise [us]last to current values Jan Stancek
@ 2012-03-08  2:48 ` Caspar Zhang
       [not found]   ` <4F582C39.10307@cn.fujitsu.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Caspar Zhang @ 2012-03-08  2:48 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

On 03/07/2012 11:51 PM, Jan Stancek wrote:
> 
> On slower machines, startup can take some time,
> set last values to current [us]time before actual test.
> 
> This caused test to fail, because first delta contained
> time spent by test starting up:
> getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
> getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
> getrusage04    1  TFAIL  :  stime increased > 1000us: delta = 6998us
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>   testcases/kernel/syscalls/getrusage/getrusage04.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)

Hi Jan, committed.

Thanks,
Caspar

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] getrusage04: initialise [us]last to current values
       [not found]   ` <4F582C39.10307@cn.fujitsu.com>
@ 2012-03-08 12:24     ` Cyril Hrubis
  2012-03-08 12:26       ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2012-03-08 12:24 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: ltp-list

Hi!
> >> On slower machines, startup can take some time,
> >> set last values to current [us]time before actual test.
> >>
> >> This caused test to fail, because first delta contained
> >> time spent by test starting up:
> >> getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
> >> getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
> >> getrusage04    1  TFAIL  :  stime increased > 1000us: delta = 6998us
> >>
> >> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> >> ---
> >>   testcases/kernel/syscalls/getrusage/getrusage04.c |    4 +++-
> >>   1 files changed, 3 insertions(+), 1 deletions(-)
> > 
> > Hi Jan, committed.
> 
> 
> I can't see that linux-test-project/ltp auto sync from sf since you commit
> this patch, so I guess Cyril set the auto sync from linux-test-project/ltp
> to sf, so, maybe you should commit to github and it'll auto sync to sf, right?

The auto sync is prepared but not yet running. I'll will start that once
we discuss this change on LTP mailing list and make sure everybody
understand the change. Till that sync is done by hand.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] getrusage04: initialise [us]last to current values
  2012-03-08 12:24     ` Cyril Hrubis
@ 2012-03-08 12:26       ` Cyril Hrubis
  0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2012-03-08 12:26 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: ltp-list

Hi!
> > I can't see that linux-test-project/ltp auto sync from sf since you commit
> > this patch, so I guess Cyril set the auto sync from linux-test-project/ltp
> > to sf, so, maybe you should commit to github and it'll auto sync to sf, right?
> 
> The auto sync is prepared but not yet running. I'll will start that once
> we discuss this change on LTP mailing list and make sure everybody
> understand the change. Till that sync is done by hand.

And FYI, I've just verifed that the script is working and synced the
github repo with the sf one.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-08 12:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 15:51 [LTP] [PATCH] getrusage04: initialise [us]last to current values Jan Stancek
2012-03-08  2:48 ` Caspar Zhang
     [not found]   ` <4F582C39.10307@cn.fujitsu.com>
2012-03-08 12:24     ` Cyril Hrubis
2012-03-08 12:26       ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox