Changeset 5b951175 in rtems for testsuites


Ignore:
Timestamp:
Jan 7, 2019, 1:22:22 PM (11 months ago)
Author:
Jiri Gaisler <jiri@…>
Branches:
master
Children:
7802bb9
Parents:
9c12bcfd
git-author:
Jiri Gaisler <jiri@…> (01/07/19 13:22:22)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/07/19 13:23:50)
Message:

psxfile01: Fix one second sleep

Checking of atime in psxfile01 (line 713) can fail since a delay for
rtems_clock_get_ticks_per_second (line 699) gives a delay of less than
one second, depending on when the last tick occurred. atime is measured
in whole seconds, and a fast processor might read the file before a new
second occurs. Add one tick to the delay will solve the problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxfile01/test.c

    r9c12bcfd r5b951175  
    697697
    698698
    699   status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
     699  status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() + 1);
    700700  rewind( file );
    701701  while ( fgets(buffer, 128, file) )
Note: See TracChangeset for help on using the changeset viewer.