CAI Qian wrote:
> From: Michal Simek <[email protected]>
> Subject: [LTP] times03
> Date: Fri, 17 Apr 2009 18:03:12 +0200
>
>
>> Hi Subrata,
>>
>> I would like talk to you about times03.
>>
>> I found this part of message at http://lwn.net/Articles/280726/ about
>> times03 but times03 is still there.
>> That message is from Thu, 01 May 2008 and from that time there are only
>> changes which I did around coding style cleanup.
>>
>> 33) Log Message:
>> According to Ulrich Drepper, times02 test is bogus (at least for archs which
>> report return value and error in the same value) and times has no reserved
>> error code. So following patch removes times02 from testsuite and moves
>> times03 test to times02. For more information please see
>> http://sources.redhat.com/ml/libc-alpha/2008-04/msg00054....
>> <http://sources.redhat.com/ml/libc-alpha/2008-04/msg00054.html> and
>> http://sources.redhat.com/ml/libc-alpha/2008-04/msg00055....
>> <http://sources.redhat.com/ml/libc-alpha/2008-04/msg00055.html>.
>> Signed-off-by:
>> S.Ça?lar Onur <[email protected]>
>>
>>
>> Currently times03 failed on my system with the following fault
>> # ./times03
>> times03 1 FAIL : Error: times() report 0 child system time should
>> be > than zero
>>
>>
>
> Not able to reproduce it on kernel-2.6.27.5-117.fc10.i686 here, and any
> RHEL4 and RHEL5 systems on all architectures tested.
>
> # ./times03
> times03 1 PASS : times03: Functionality test passed
>
> Looks like you were failing here,
>
> if (buf2.tms_cstime == 0) {
> tst_resm(TFAIL, "Error: times() "
> "report %d child system time "
> "should be > than zero",
> buf2.tms_cstime);
> fail=1;
> }
>
> It was a little bit surprise that in your case, the following child
> seemed not spend any system time,
>
The problem could be caused that my cpu runs only at 125MHz and the
child ends before tms_cstime update.
I use generic kernel time solution and I know if I add some printk
messages to start_thread the problem go away -> that's of course make
sense because kernel spends more time in every user process.
Thomas: Do you have any suggestion what could be wrong?
> pid2 = FORK_OR_VFORK();
> if (pid2 < 0) {
> tst_brkm(TFAIL, cleanup, "Fork failed");
> /*NOTREACHED*/
> } else if (pid2 == 0) {
> timeout = 0;
> alarm(3);
>
> work();
>
>
> /*
> * Atleast some CPU system ime must be used
> * even in the child process (thereby
> * making it independent of the
> * processor speed). In fact the child
> * uses twice as much CPU time.
> */
> start_time = time(NULL);
> for (;;) {
> if (times(&buf2) == -1) {
> tst_resm(TFAIL,
> "Call to times "
> "failed, "
> "errno = %d",
> errno);
> exit(1);
> }
> end_time = time(NULL);
> if ((end_time - start_time)
> > 10) {
> break;
> }
> }
> exit(0);
> }
>
> To provide more useful information, please list your kernel/machine
> type, and paste the output of the command here,
>
> # strace ./times03
>
I use Microblaze arch and we don't have strace in place yet. :-(
Thanks for your suggestions.
Michal
> CAI Qian
>
>
>> Any hints what could be wrong?
>>
>> Thanks,
>> Michal
>>
>> --
>> Michal Simek, Ing. (M.Eng)
>> PetaLogix - Linux Solutions for a Reconfigurable World
>> w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
>>
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> Ltp-list mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/ltp-list
>>
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list