Ola, as I understood Mike correctly you need to replace
perror("nanosleep"), abort();
with something CUnit friendly, like:
CU_FAIL(strerror(errno));

Maxim.

On 01/16/2015 08:05 PM, Ola Liljedahl wrote:
(Previous version of patch broken up into smaller patches)
Don't report late timeouts using CU_FAIL as this interferes with the cunit
test framework. Just count and report (using LOG_DBG) the number of late
timeouts. (Discussed with Mike Holmes)
Don't dereference pointer after successful check for NULL as this makes Coverity
complain. (Coverity CID 85397, https://bugs.linaro.org/show_bug.cgi?id=1056)
Use nanosleep instead of the deprecated usleep. Define POSIX version to be able
to use rand_r. (https://bugs.linaro.org/show_bug.cgi?id=1048)
Use CU_ASSERT_FATAL instead of plain assert so to work better with the cunit
test framework.
Use LOG_DBG instead of printf. Remove some unnecessary printouts.
Ensure we run at least one worker thread.

Ola Liljedahl (4):
   test: odp_timer.c: avoid cunit warnings for late timeouts
   test: odp_timer.c: avoid dereferencing ptr after NULL check
   test: odp_timer.c: use nanosleep instead of usleep
   test: odp_timer.c: cunit cleanup

  test/validation/odp_timer.c | 102 +++++++++++++++++++++++++-------------------
  1 file changed, 59 insertions(+), 43 deletions(-)



_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to