#1293 closed defect (fixed)

Test PSX10 asserts due to timeval.tv_nsec negative

Reported by: Tim FitzGeorge Owned by: Joel Sherrill
Priority: normal Milestone: 4.9
Component: unspecified Version: 4.8
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

BSP SPARC/LEON3

In the test PSX10, the check for "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time)" (at about init.c line 260) can assert due to a value of tv_nsec of -1. For tests on tsim2/leon3 2.0.10 this happens on every run. It does not happen on a Pender board using a runtest modified to use grmon.

A possible solution is:

do
{

status = clock_gettime( CLOCK_REALTIME, &timeout );
assert( !status );
tv_nsec -= 1;

} while ( timeout.tv_nsec < 0);

This works on both the above test setups.

The same problem looks as if it exists for the previous check (for tv_sec < current time), but it is probably not possible due to delays in earlier checks.

Configuration: --target=sparc-rtems4.8 --enable-maintainer-mode --disable-multiprocessing --enable-posix --disable-itron --disable-networking --disable-cxx --enable-tests=yes --enable-rtemsbsp=leon3
Host: OpenSUSE 10.3
Tools: From ftp.rtems.org
Test kit: runtest / tsim 2.0.10 (fails)
Test kit: runtest (modified) / grmon 1.1.29 / Pender GR-PCI-XC5V / leon3 (pass)

Change History (2)

comment:1 Changed on Aug 4, 2008 at 6:34:32 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Fix on all active branches.

comment:2 Changed on Oct 10, 2017 at 6:46:55 AM by Sebastian Huber

Component: testingunspecified
Note: See TracTickets for help on using tickets.