Changeset 996d18c in rtems


Ignore:
Timestamp:
08/10/22 22:17:24 (2 months ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
21a36ed1
Parents:
c655c72d
git-author:
Joel Sherrill <joel@…> (08/10/22 22:17:24)
git-committer:
Joel Sherrill <joel@…> (08/11/22 18:10:11)
Message:

psxtimer_face01: Improve coverage and documentation

Updates #4691.

Location:
testsuites/psxtests/psxtimer_face01
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxtimer_face01/psxtimer.c

    rc655c72d r996d18c  
    5555
    5656  /*
    57    *  If these are not filled in correctly, we don't pass its error checking.
     57   *  If these are not filled in correctly, we do not execute pass the
     58   *  error checking for a NULL event pointer.
    5859   */
    5960  event.sigev_notify = SIGEV_SIGNAL;
     
    6263  TEST_BEGIN();
    6364
     65  /*
     66   * When FACE timer behavior is configured, creating a POSIX timer
     67   * using CLOCK_REALTIME is not allowed.
     68   */
    6469  puts( "timer_create - CLOCK_REALTIME forbidden - EPERM" );
    6570  status = timer_create( CLOCK_REALTIME, &event, &timer );
    6671  fatal_posix_service_status_errno( status, EPERM, "not allowed" );
     72
     73  /*
     74   * When FACE timer behavior is configured, creating a POSIX timer
     75   * on a value other than CLOCK_REALTIME or CLOCK_MONOTONIC is not allowed.
     76   */
     77  puts( "timer_create - CLOCK_PROCESS_CPUTIME_ID not allowed - EINVAL" );
     78  status = timer_create( CLOCK_PROCESS_CPUTIME_ID, &event, &timer );
     79  fatal_posix_service_status_errno( status, EINVAL, "invalid clock" );
     80
     81  /*
     82   * When FACE timer behavior is configured, creating a POSIX timer
     83   * on CLOCK_MONOTONIC allowed.
     84   */
     85  puts( "timer_create - OK" );
     86  status = timer_create( CLOCK_MONOTONIC, &event, &timer );
     87  posix_service_failed( status, "timer_create OK" );
     88
     89  /*
     90   * Delete the previously created timer.
     91   */
     92  puts( "timer_delete - OK" );
     93  status = timer_delete(  timer );
     94  posix_service_failed( status, "timer_delete ok" );
     95
     96  /*
     97   */
     98  puts( "timer_create - CLOCK_MONOTONIC is allowed - OK" );
     99  status = timer_create( CLOCK_MONOTONIC, &event, &timer );
     100  posix_service_failed( status, "timer_create ok" );
    67101
    68102  TEST_END();
  • testsuites/psxtests/psxtimer_face01/psxtimer_face01.scn

    rc655c72d r996d18c  
    1 *** BEGIN OF TEST PSXTIMER 2 ***
    2 *** TEST VERSION: 6.0.0.1c6ac88f938f4b135f3bbffc4b19bbc540508c80
    3 *** END OF TEST PSXTIMER 2 ***
    4 
     1*** BEGIN OF TEST FACE 1 ***
     2timer_create - CLOCK_REALTIME forbidden - EPERM
     3timer_create - CLOCK_PROCESS_CPUTIME_ID not allowed - EINVAL
     4timer_create - OK
     5timer_delete - OK
     6*** END OF TEST PSXTIMER FACE 1 ***
Note: See TracChangeset for help on using the changeset viewer.