Changeset 280c4ca in rtems


Ignore:
Timestamp:
Jan 5, 2000, 10:03:44 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
f49aaf18
Parents:
5cffd64
Message:

Corrected test and screen to reflect implementation working.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/sptests/sp29/init.c

    r5cffd64 r280c4ca  
    6868        rtems_interval then, now;
    6969
     70        puts( "*** SP29 - SIMPLE SEMAPHORE TEST ***" );
     71        puts( "This test only prints on errors." );
     72 
    7073        sc = rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
    7174        if (sc != RTEMS_SUCCESSFUL) {
     
    8487        sc = rtems_semaphore_create (rtems_build_name ('S', 'M', 'n', 'c'),
    8588                1,
    86                 RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_NO_NESTING_ALLOWED|RTEMS_INHERIT_PRIORITY |RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
     89                RTEMS_PRIORITY|RTEMS_SIMPLE_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY |RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
    8790                0,
    8891                &semnorec);
     
    152155                printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__);
    153156        }
    154         else if (sc != RTEMS_UNSATISFIED) {
    155                 printf ("%d: Reobtain non-recursive-lock semaphore failed, but error is %d (%s), not RTEMS_UNSATISFIED.\n", __LINE__, sc, rtems_status_text (sc));
     157        else if (sc != RTEMS_TIMEOUT) {
     158                printf ("%d: Reobtain non-recursive-lock semaphore failed, but error is %d (%s), not RTEMS_TIMEOUT.\n", __LINE__, sc, rtems_status_text (sc));
    156159        }
    157160        if ((then - now) < 4)
     
    169172                if (sc != RTEMS_SUCCESSFUL)
    170173                        printf ("%d: Failed to obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
    171                 else if (diff < (2 * ticksPerSecond + 1))
    172                         printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks\n", __LINE__, diff);
     174                else if (diff < (2 * ticksPerSecond))
     175                        printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks not %d ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
    173176        }
    174177               
     178        puts( "*** END OF SP29 ***" );
    175179        exit (0);
    176180}
  • c/src/tests/sptests/sp29/sp29.scn

    r5cffd64 r280c4ca  
     1*** SP29 - SIMPLE SEMAPHORE TEST ***
     2This test only prints on errors.
     3*** END OF SP29 ***
     4
  • testsuites/sptests/sp29/init.c

    r5cffd64 r280c4ca  
    6868        rtems_interval then, now;
    6969
     70        puts( "*** SP29 - SIMPLE SEMAPHORE TEST ***" );
     71        puts( "This test only prints on errors." );
     72 
    7073        sc = rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
    7174        if (sc != RTEMS_SUCCESSFUL) {
     
    8487        sc = rtems_semaphore_create (rtems_build_name ('S', 'M', 'n', 'c'),
    8588                1,
    86                 RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_NO_NESTING_ALLOWED|RTEMS_INHERIT_PRIORITY |RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
     89                RTEMS_PRIORITY|RTEMS_SIMPLE_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY |RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
    8790                0,
    8891                &semnorec);
     
    152155                printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__);
    153156        }
    154         else if (sc != RTEMS_UNSATISFIED) {
    155                 printf ("%d: Reobtain non-recursive-lock semaphore failed, but error is %d (%s), not RTEMS_UNSATISFIED.\n", __LINE__, sc, rtems_status_text (sc));
     157        else if (sc != RTEMS_TIMEOUT) {
     158                printf ("%d: Reobtain non-recursive-lock semaphore failed, but error is %d (%s), not RTEMS_TIMEOUT.\n", __LINE__, sc, rtems_status_text (sc));
    156159        }
    157160        if ((then - now) < 4)
     
    169172                if (sc != RTEMS_SUCCESSFUL)
    170173                        printf ("%d: Failed to obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
    171                 else if (diff < (2 * ticksPerSecond + 1))
    172                         printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks\n", __LINE__, diff);
     174                else if (diff < (2 * ticksPerSecond))
     175                        printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks not %d ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
    173176        }
    174177               
     178        puts( "*** END OF SP29 ***" );
    175179        exit (0);
    176180}
  • testsuites/sptests/sp29/sp29.scn

    r5cffd64 r280c4ca  
     1*** SP29 - SIMPLE SEMAPHORE TEST ***
     2This test only prints on errors.
     3*** END OF SP29 ***
     4
Note: See TracChangeset for help on using the changeset viewer.