diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-12-08 17:52:53 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-12-08 17:52:53 +0000 |
commit | 2317457e101509ca16a669d99719ae44b0c60599 (patch) | |
tree | 76c26f4c12c18c55f067f00e644a28dded70c79b /testsuites/psxtests/psx06 | |
parent | 2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-2317457e101509ca16a669d99719ae44b0c60599.tar.bz2 |
2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c,
psx03/init.c, psx03/task.c, psx04/init.c, psx04/task1.c,
psx04/task2.c, psx04/task3.c, psx05/init.c, psx05/task.c,
psx05/task2.c, psx05/task3.c, psx06/init.c, psx06/task.c,
psx06/task2.c, psx07/init.c, psx08/init.c, psx08/task2.c,
psx08/task3.c, psx09/init.c, psx10/init.c, psx10/task.c,
psx10/task2.c, psx10/task3.c, psx11/init.c, psx11/task.c,
psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c,
psxcancel01/init.c, psxchroot01/test.c, psxclock/init.c,
psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c,
psxfile01/test_write.c, psxitimer/init.c, psxkey01/task.c,
psxkey02/init.c, psxkey03/init.c, psxmount/test.c, psxmsgq01/init.c,
psxmsgq03/init.c, psxmsgq04/init.c, psxreaddir/test.c,
psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c,
psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c,
psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c,
psxstack01/init.c, psxstat/test.c, psxtime/test.c, psxualarm/init.c:
Use rtems_test_assert() consistently instead of system assert().
rtems_test_assert() is designed to integrate into the RTEMS test
suite infrastructure.
Diffstat (limited to 'testsuites/psxtests/psx06')
-rw-r--r-- | testsuites/psxtests/psx06/init.c | 20 | ||||
-rw-r--r-- | testsuites/psxtests/psx06/task.c | 6 | ||||
-rw-r--r-- | testsuites/psxtests/psx06/task2.c | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/testsuites/psxtests/psx06/init.c b/testsuites/psxtests/psx06/init.c index eab79e3d39..7d19e3f7a2 100644 --- a/testsuites/psxtests/psx06/init.c +++ b/testsuites/psxtests/psx06/init.c @@ -52,10 +52,10 @@ void *POSIX_Init( /* create a couple of threads */ status = pthread_create( &Task_id, NULL, Task_1, NULL ); - assert( !status ); + rtems_test_assert( !status ); status = pthread_create( &Task2_id, NULL, Task_2, NULL ); - assert( !status ); + rtems_test_assert( !status ); /* create a key */ @@ -66,31 +66,31 @@ void *POSIX_Init( status = pthread_key_create( &Key_id, Key_destructor ); if ( status ) printf( "status = %d\n", status ); - assert( !status ); + rtems_test_assert( !status ); printf( "Destructor invoked %d times\n", Destructor_invoked ); puts( "Init: pthread_key_create - EAGAIN (too many keys)" ); status = pthread_key_create( &Key_id, Key_destructor ); - assert( status == EAGAIN ); + rtems_test_assert( status == EAGAIN ); puts( "Init: pthread_setspecific - EINVAL (invalid key)" ); status = pthread_setspecific( (pthread_t) -1, &Data_array[ 0 ] ); - assert( status == EINVAL ); + rtems_test_assert( status == EINVAL ); puts( "Init: pthread_getspecific - EINVAL (invalid key)" ); key_data = pthread_getspecific( (pthread_t) -1 ); - assert( !key_data ); + rtems_test_assert( !key_data ); puts( "Init: pthread_key_delete - EINVAL (invalid key)" ); status = pthread_key_delete( (pthread_t) -1 ); - assert( status == EINVAL ); + rtems_test_assert( status == EINVAL ); printf( "Init: Setting the key to %d\n", 0 ); status = pthread_setspecific( Key_id, &Data_array[ 0 ] ); if ( status ) printf( "status = %d\n", status ); - assert( !status ); + rtems_test_assert( !status ); /* switch to task 1 */ @@ -101,7 +101,7 @@ void *POSIX_Init( remaining = sleep( 3 ); if ( remaining ) printf( "seconds remaining = %d\n", remaining ); - assert( !remaining ); + rtems_test_assert( !remaining ); /* switch to task 1 */ @@ -111,7 +111,7 @@ void *POSIX_Init( status = pthread_key_delete( Key_id ); if ( status ) printf( "status = %d\n", status ); - assert( !status ); + rtems_test_assert( !status ); printf( "Destructor invoked %d times\n", Destructor_invoked ); diff --git a/testsuites/psxtests/psx06/task.c b/testsuites/psxtests/psx06/task.c index 8284ed6119..e29f823374 100644 --- a/testsuites/psxtests/psx06/task.c +++ b/testsuites/psxtests/psx06/task.c @@ -8,7 +8,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -32,14 +32,14 @@ void *Task_1( status = pthread_setspecific( Key_id, &Data_array[ 1 ] ); if ( status ) printf( "status = %d\n", status ); - assert( !status ); + rtems_test_assert( !status ); key_data = pthread_getspecific( Key_id ); printf( "Task_1: Got the key value of %ld\n", (unsigned long) ((uint32_t *)key_data - Data_array) ); if ( status ) printf( "status = %d\n", status ); - assert( !status ); + rtems_test_assert( !status ); puts( "Task_1: exitting" ); pthread_exit( NULL ); diff --git a/testsuites/psxtests/psx06/task2.c b/testsuites/psxtests/psx06/task2.c index e894e40a1d..de981e5a26 100644 --- a/testsuites/psxtests/psx06/task2.c +++ b/testsuites/psxtests/psx06/task2.c @@ -7,7 +7,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -33,14 +33,14 @@ void *Task_2( status = pthread_setspecific( Key_id, &Data_array[ 2 ] ); if ( status ) printf( "status = %d\n", status ); - assert( !status ); + rtems_test_assert( !status ); key_data = pthread_getspecific( Key_id ); printf( "Task_2: Got the key value of %ld\n", (unsigned long) ((uint32_t *)key_data - Data_array) ); if ( status ) printf( "status = %d\n", status ); - assert( !status ); + rtems_test_assert( !status ); puts( "Task2: exitting" ); pthread_exit( NULL ); |