diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-18 15:32:49 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-18 15:32:49 +0000 |
commit | 7d414c33ae972ceb2b73b52f47e4bc462f0c8e0b (patch) | |
tree | 87d69082e5ba27aeef09a04218a07cc673ababab /testsuites | |
parent | 2009-08-18 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-7d414c33ae972ceb2b73b52f47e4bc462f0c8e0b.tar.bz2 |
2009-08-18 Joel Sherrill <joel.sherrill@OARcorp.com>
* spobjgetnext/init.c, spobjgetnext/spobjgetnext.scn: Add error cases
for various null parameters.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/sptests/spobjgetnext/init.c | 21 | ||||
-rw-r--r-- | testsuites/sptests/spobjgetnext/spobjgetnext.scn | 7 |
3 files changed, 31 insertions, 2 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index ec00527e38..79db688ce5 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,10 @@ 2009-08-18 Joel Sherrill <joel.sherrill@OARcorp.com> + * spobjgetnext/init.c, spobjgetnext/spobjgetnext.scn: Add error cases + for various null parameters. + +2009-08-18 Joel Sherrill <joel.sherrill@OARcorp.com> + * sp16/sp16.scn, sp16/task1.c: Fix typo. 2009-08-17 Santosh G Vattam <vattam.santosh@gmail.com> diff --git a/testsuites/sptests/spobjgetnext/init.c b/testsuites/sptests/spobjgetnext/init.c index eaabffcf65..39535a6fc5 100644 --- a/testsuites/sptests/spobjgetnext/init.c +++ b/testsuites/sptests/spobjgetnext/init.c @@ -63,20 +63,37 @@ rtems_task Init( rtems_status_code status; rtems_id main_task; int count; + Objects_Control *o; + Objects_Locations location; + Objects_Id id; + Objects_Information *info; puts( "\n\n*** TEST OBJECT GET NEXT ***" ); + info = &_RTEMS_tasks_Information; main_task = rtems_task_self(); + puts( "Init - _Objects_Get_next - NULL object information" ); + o = _Objects_Get_next( NULL, main_task, &location, &id ); + assert( o == NULL ); + + puts( "Init - _Objects_Get_next - NULL location" ); + o = _Objects_Get_next( info, main_task, NULL, &id ); + assert( o == NULL ); + + puts( "Init - _Objects_Get_next - NULL id" ); + o = _Objects_Get_next( info, main_task, &location, NULL ); + assert( o == NULL ); + /* XXX push the three NULL error cases */ /* simple case of only all tasks in the system, starting at initial */ - count = scan_objects( &_RTEMS_tasks_Information, OBJECTS_ID_INITIAL_INDEX ); + count = scan_objects( info, OBJECTS_ID_INITIAL_INDEX ); printf( "%d RTEMS Task%s\n", count, ((count == 1) ? "" : "s") ); assert( count == 1 ); /* simple case of only 1 task in the system, starting at that task */ - count = scan_objects( &_RTEMS_tasks_Information, main_task ); + count = scan_objects( info, main_task ); printf( "%d RTEMS Task%s\n", count, ((count == 1) ? "" : "s") ); assert( count == 1 ); diff --git a/testsuites/sptests/spobjgetnext/spobjgetnext.scn b/testsuites/sptests/spobjgetnext/spobjgetnext.scn index e69de29bb2..b5e7b115df 100644 --- a/testsuites/sptests/spobjgetnext/spobjgetnext.scn +++ b/testsuites/sptests/spobjgetnext/spobjgetnext.scn @@ -0,0 +1,7 @@ +*** TEST OBJECT GET NEXT *** +Init - _Objects_Get_next - NULL object information +Init - _Objects_Get_next - NULL location +Init - _Objects_Get_next - NULL id +1 RTEMS Task +1 RTEMS Task +*** END OF TEST OBJECT GET NEXT *** |