Skip to contentSkip to conversation

getrusage04: initialise [us]last to current values

PATCH In review Jan Stancek 3 participants 4 messages Mar 7, 2012 – Mar 8, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 getrusage04: initialise [us]last to current values

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
---
 testcases/kernel/syscalls/getrusage/getrusage04.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/getrusage/getrusage04.c +3 -1
index e142d22..9801192 100644
@@ -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;

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 6 lines · Jan Stancek

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:

Quoted 8 lines
getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
getrusage04    0  TINFO  :  utime:         999us; stime:        6998us
getrusage04    1  TFAIL  :  stime increased > 1000us: delta = 6998us
---
  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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi!

Quoted 14 lines
Quoted 14 lines
Quoted 13 lines

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
---
  testcases/kernel/syscalls/getrusage/getrusage04.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
Quoted 6 lines
Quoted 1 line

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.

Signature · 12 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#4 lore raw

Hi!

Quoted 7 lines
Quoted 3 lines

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.

Signature · 12 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list