This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: libc-time-clock test doesn't seem to be written correctly??
- From: Brij Bihari Pandey <fuzzhead012 at yahoo dot com>
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 19 Jun 2003 05:30:50 -0700 (PDT)
- Subject: Re: [ECOS] libc-time-clock test doesn't seem to be written correctly??
Hi Jonathan,
[snip]
> > 40%, because err(100*(3-2)/2) > TOLERANCE(40).
> [snip]
> I suppose it's possible with small values, although I've never seen a port
> do this in practice - the processor would have to be slow and the clock
> rate fast.
Sure. Had there been some port like that in practice, someone should have
surely mentioned that on the list. I pointed out issues with test so that
newbies on hardwares don't break their heads looking for problems, perturbed by
test FAIL messages. Possibly I would have - how could there be problem with the
test, wouldn't anyone on list have mentioned it earlier, if it was so?
> > That's right reason to look for, but test seems to be overdoing in deciding
> > test failures.
> Not in my experience in boards I've so far encountered - are you saying it
> has in your case?
What I meant by overdoing is - test as-it-is-now is susceptible to wrong
inference about clock stability in reasonable number of situation.
> I would accept a patch on those lines; or more precisely, something that
> checks for the %tolerance, and then checks if the difference is greater
> than an absolute amount. A fudge factor really :-). That will allow minor
> anomalies to pass, as well as small values.
>
> Send me a patch like that and I'll review it.
Will do as you ask for. It looks like maximum 2-3 lines of code insertion.
Plain diff of patched code vs original code will do?
> If the underlying clock is correctly periodic, the return value of clock()
> should change similarly periodically. And counting how long it takes to do
> this in a for loop in a consistent way should therefore result in similar
> numbers.
Do you mean to say that the time taken between 1st iteration of for-loop in two
consecutive calls of clock_loop in the test will be same or is it something
different that I am not getting here? First one is obvious enough, always
supposed to happen.
brij
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss