Notice: We have migrated to GitLab launching 2024-05-01 see here:

#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:



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:


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
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 08/04/08 at 18:34:32 by Joel Sherrill

Resolution: fixed
Status: newclosed

Fix on all active branches.

comment:2 Changed on 10/10/17 at 06:46:55 by Sebastian Huber

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