This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libc-time-clock test doesn't seem to be written correctly??


Hi,

I have few doubts about packages/language/c/libc/time/current/tests/clock.c
Doesn't look like that this test will function correctly (as desired by test
writers).

- It is quite possible that clock_loop returns "0", as the code there breaks
  out in the first iteration of for-loop and it happens more or less 
  consistently in all the calls to clock_loop. In this case, the mean value in
  main will turn out to be zero causing division-by-zero in err calculation.

  Another related thought - shouldn't the analysis of going through valid
  results and comparing against average -- be done using floating point 
  arithmetic for mean/err computation and comparision?

- Should test fail on first err value, that is not within TOLERANCE?
  It may be better if failure-tolerance (another parameter) is taken on
  number-of-samples not within TOLERANCE limit, to decide the test-failure.

What I gather from the comments in the test, that it tests -
- if clock is working or not,
- if it is stable (PASS message) or not.

Am I right in my understading the purpose of this test?

Though I don't quite get -
- What is meant by stability of clock?
- In what way the nature of test ensures it is testing stability of clock?

Does anyone have any clue?

Any feedback on doubts/issues raised in this mail is welcome.
brij



__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]