Changeset 280c4ca in rtems
- Timestamp:
- 01/05/00 22:03:44 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- f49aaf18
- Parents:
- 5cffd64
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/tests/sptests/sp29/init.c
r5cffd64 r280c4ca 68 68 rtems_interval then, now; 69 69 70 puts( "*** SP29 - SIMPLE SEMAPHORE TEST ***" ); 71 puts( "This test only prints on errors." ); 72 70 73 sc = rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 71 74 if (sc != RTEMS_SUCCESSFUL) { … … 84 87 sc = rtems_semaphore_create (rtems_build_name ('S', 'M', 'n', 'c'), 85 88 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, 87 90 0, 88 91 &semnorec); … … 152 155 printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__); 153 156 } 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)); 156 159 } 157 160 if ((then - now) < 4) … … 169 172 if (sc != RTEMS_SUCCESSFUL) 170 173 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) ); 173 176 } 174 177 178 puts( "*** END OF SP29 ***" ); 175 179 exit (0); 176 180 } -
c/src/tests/sptests/sp29/sp29.scn
r5cffd64 r280c4ca 1 *** SP29 - SIMPLE SEMAPHORE TEST *** 2 This test only prints on errors. 3 *** END OF SP29 *** 4 -
testsuites/sptests/sp29/init.c
r5cffd64 r280c4ca 68 68 rtems_interval then, now; 69 69 70 puts( "*** SP29 - SIMPLE SEMAPHORE TEST ***" ); 71 puts( "This test only prints on errors." ); 72 70 73 sc = rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 71 74 if (sc != RTEMS_SUCCESSFUL) { … … 84 87 sc = rtems_semaphore_create (rtems_build_name ('S', 'M', 'n', 'c'), 85 88 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, 87 90 0, 88 91 &semnorec); … … 152 155 printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__); 153 156 } 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)); 156 159 } 157 160 if ((then - now) < 4) … … 169 172 if (sc != RTEMS_SUCCESSFUL) 170 173 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) ); 173 176 } 174 177 178 puts( "*** END OF SP29 ***" ); 175 179 exit (0); 176 180 } -
testsuites/sptests/sp29/sp29.scn
r5cffd64 r280c4ca 1 *** SP29 - SIMPLE SEMAPHORE TEST *** 2 This test only prints on errors. 3 *** END OF SP29 *** 4
Note: See TracChangeset
for help on using the changeset viewer.