Changeset e6b31b27 in rtems for testsuites/sptests/sp69/init.c


Ignore:
Timestamp:
May 27, 2015, 3:13:58 PM (4 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
e0938c2
Parents:
80fca28
git-author:
Joel Sherrill <joel.sherrill@…> (05/27/15 15:13:58)
git-committer:
Joel Sherrill <joel.sherrill@…> (06/15/15 18:20:17)
Message:

Remove use ticks for statistics configure option.

This was obsolete and broken based upon recent time keeping changes.

Thie build option was previously enabled by adding
USE_TICKS_FOR_STATISTICS=1 to the configure command line.

This propagated into the code as preprocessor conditionals
using the RTEMS_USE_TICKS_FOR_STATISTICS conditional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sp69/init.c

    r80fca28 re6b31b27  
    5656  rtems_test_assert( period_status.owner == rtems_task_self() );
    5757  rtems_test_assert( period_status.state == RATE_MONOTONIC_INACTIVE );
    58   #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    59     rtems_test_assert( period_status.since_last_period.tv_sec == 0 );
    60     rtems_test_assert( period_status.since_last_period.tv_nsec == 0 );
    61     rtems_test_assert( period_status.executed_since_last_period.tv_sec == 0 );
    62     rtems_test_assert( period_status.executed_since_last_period.tv_nsec == 0 );
    63   #else
    64     rtems_test_assert( period_status.since_last_period == 0 );
    65     rtems_test_assert( period_status.executed_since_last_period == 0 );
    66   #endif
     58  rtems_test_assert( period_status.since_last_period.tv_sec == 0 );
     59  rtems_test_assert( period_status.since_last_period.tv_nsec == 0 );
     60  rtems_test_assert( period_status.executed_since_last_period.tv_sec == 0 );
     61  rtems_test_assert( period_status.executed_since_last_period.tv_nsec == 0 );
    6762
    6863  /*
     
    114109
    115110  /* Check status values. */
    116   #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    117111  /* Note: POSIX mandates struct timespec->tv_nsec to be a "long" */
    118     printf(
    119       "wall time should be ~600000000 is %ld\n",
    120       period_status.since_last_period.tv_nsec
    121     );
    122     printf(
    123       "cpu time should be ~100000000 is %ld\n",
    124       period_status.executed_since_last_period.tv_nsec
    125     );
    126     rtems_test_assert( period_status.since_last_period.tv_sec == 0 );
    127     rtems_test_assert( period_status.since_last_period.tv_nsec >= 600000000 );
    128     rtems_test_assert( period_status.since_last_period.tv_nsec <= 610000000 );
    129     rtems_test_assert( period_status.executed_since_last_period.tv_sec == 0 );
    130     rtems_test_assert(
    131       period_status.executed_since_last_period.tv_nsec >= 100000000
    132     );
    133     rtems_test_assert(
    134       period_status.executed_since_last_period.tv_nsec <= 110000000
    135     );
    136   #else
    137     printf(
    138       "wall time should be ~60 is %" PRId32 "\n",
    139       (int) period_status.since_last_period
    140     );
    141     printf(
    142       "cpu time should be ~10 is %" PRId32 "\n",
    143       (int) period_status.executed_since_last_period
    144     );
    145     rtems_test_assert( period_status.since_last_period >= 60 );
    146     rtems_test_assert( period_status.since_last_period <= 61 );
    147     rtems_test_assert( period_status.executed_since_last_period >= 10 );
    148     rtems_test_assert( period_status.executed_since_last_period <= 12 );
    149   #endif
     112  printf(
     113    "wall time should be ~600000000 is %ld\n",
     114    period_status.since_last_period.tv_nsec
     115  );
     116  printf(
     117    "cpu time should be ~100000000 is %ld\n",
     118    period_status.executed_since_last_period.tv_nsec
     119  );
     120  rtems_test_assert( period_status.since_last_period.tv_sec == 0 );
     121  rtems_test_assert( period_status.since_last_period.tv_nsec >= 600000000 );
     122  rtems_test_assert( period_status.since_last_period.tv_nsec <= 610000000 );
     123  rtems_test_assert( period_status.executed_since_last_period.tv_sec == 0 );
     124  rtems_test_assert(
     125    period_status.executed_since_last_period.tv_nsec >= 100000000
     126  );
     127  rtems_test_assert(
     128    period_status.executed_since_last_period.tv_nsec <= 110000000
     129  );
    150130
    151131  /* ensure the missed periods are properly accounted for */
Note: See TracChangeset for help on using the changeset viewer.