forked from Imagelibrary/rtems
2009-06-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add new test. * sp54/.cvsignore, sp54/Makefile.am, sp54/init.c, sp54/sp54.doc, sp54/sp54.scn: New files.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-06-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, configure.ac: Add new test.
|
||||||
|
* sp54/.cvsignore, sp54/Makefile.am, sp54/init.c, sp54/sp54.doc,
|
||||||
|
sp54/sp54.scn: New files.
|
||||||
|
|
||||||
2009-06-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-06-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* Makefile.am, configure.ac: Add sp52 and sp53 based upon bug report
|
* Makefile.am, configure.ac: Add sp52 and sp53 based upon bug report
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
|
|||||||
SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
|
SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
|
||||||
sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \
|
sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \
|
||||||
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \
|
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \
|
||||||
sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 spsize spwatchdog \
|
sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 sp54 spsize spwatchdog \
|
||||||
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
||||||
spfatal08 spfatal09 spobjgetnext \
|
spfatal08 spfatal09 spobjgetnext \
|
||||||
spprintk spwkspace
|
spprintk spwkspace
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ sp50/Makefile
|
|||||||
sp51/Makefile
|
sp51/Makefile
|
||||||
sp52/Makefile
|
sp52/Makefile
|
||||||
sp53/Makefile
|
sp53/Makefile
|
||||||
|
sp54/Makefile
|
||||||
spwatchdog/Makefile
|
spwatchdog/Makefile
|
||||||
spsize/Makefile
|
spsize/Makefile
|
||||||
spfatal/Makefile
|
spfatal/Makefile
|
||||||
|
|||||||
2
testsuites/sptests/sp54/.cvsignore
Normal file
2
testsuites/sptests/sp54/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
29
testsuites/sptests/sp54/Makefile.am
Normal file
29
testsuites/sptests/sp54/Makefile.am
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
##
|
||||||
|
## $Id$
|
||||||
|
##
|
||||||
|
|
||||||
|
MANAGERS = all
|
||||||
|
|
||||||
|
rtems_tests_PROGRAMS = sp54
|
||||||
|
sp54_SOURCES = init.c
|
||||||
|
|
||||||
|
dist_rtems_tests_DATA = sp54.scn
|
||||||
|
dist_rtems_tests_DATA += sp54.doc
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||||
|
include $(top_srcdir)/../automake/compile.am
|
||||||
|
include $(top_srcdir)/../automake/leaf.am
|
||||||
|
|
||||||
|
sp54_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||||
|
|
||||||
|
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||||
|
AM_CPPFLAGS += -DUSE_TIMER_SERVER
|
||||||
|
|
||||||
|
LINK_OBJS = $(sp54_OBJECTS) $(sp54_LDADD)
|
||||||
|
LINK_LIBS = $(sp54_LDLIBS)
|
||||||
|
|
||||||
|
sp54$(EXEEXT): $(sp54_OBJECTS) $(sp54_DEPENDENCIES)
|
||||||
|
@rm -f sp54$(EXEEXT)
|
||||||
|
$(make-exe)
|
||||||
|
|
||||||
|
include $(top_srcdir)/../automake/local.am
|
||||||
76
testsuites/sptests/sp54/init.c
Normal file
76
testsuites/sptests/sp54/init.c
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/* Odd Id Error Case -- Valid Id on API with No Objects Configured
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-2009.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <tmacros.h>
|
||||||
|
|
||||||
|
rtems_task Init(
|
||||||
|
rtems_task_argument ignored
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_status_code status;
|
||||||
|
rtems_task_priority pri;
|
||||||
|
rtems_id id;
|
||||||
|
|
||||||
|
puts( "\n\n*** TEST 54 ***" );
|
||||||
|
|
||||||
|
puts( "Init - use valid id of API class with no objects" );
|
||||||
|
status = rtems_task_set_priority( 0xa010001, RTEMS_CURRENT_PRIORITY, &pri );
|
||||||
|
fatal_directive_status(
|
||||||
|
status,
|
||||||
|
RTEMS_INVALID_ID,
|
||||||
|
"rtems_task_set_priority"
|
||||||
|
);
|
||||||
|
|
||||||
|
puts( "Init - lookup name within API class with no objects" );
|
||||||
|
status = rtems_task_ident( 0x123456, RTEMS_SEARCH_ALL_NODES, &id );
|
||||||
|
fatal_directive_status(
|
||||||
|
status,
|
||||||
|
RTEMS_INVALID_NAME,
|
||||||
|
"rtems_task_ident"
|
||||||
|
);
|
||||||
|
|
||||||
|
puts( "*** END OF TEST 54 ***" );
|
||||||
|
rtems_test_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* configuration information */
|
||||||
|
|
||||||
|
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||||
|
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In this application, the initialization task performs the system
|
||||||
|
* initialization and then transforms itself into the idle task.
|
||||||
|
*/
|
||||||
|
#define CONFIGURE_IDLE_TASK_BODY Init
|
||||||
|
#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Another odd case to hit. Since we use the Init task is Idle task
|
||||||
|
* configuration, we can dummy up the initialization task configuration
|
||||||
|
* to have a non-NULL pointer and 0 tasks.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE 1
|
||||||
|
|
||||||
|
rtems_initialization_tasks_table Initialization_tasks[1] =
|
||||||
|
{ { 0, }};
|
||||||
|
|
||||||
|
#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
|
||||||
|
#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
|
||||||
|
#define CONFIGURE_INIT_TASK_STACK_SIZE 0
|
||||||
|
|
||||||
|
|
||||||
|
#define CONFIGURE_INIT
|
||||||
|
#include <rtems/confdefs.h>
|
||||||
|
|
||||||
|
/* global variables */
|
||||||
29
testsuites/sptests/sp54/sp54.doc
Normal file
29
testsuites/sptests/sp54/sp54.doc
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# COPYRIGHT (c) 1989-2009.
|
||||||
|
# On-Line Applications Research Corporation (OAR).
|
||||||
|
#
|
||||||
|
# The license and distribution terms for this file may be
|
||||||
|
# found in the file LICENSE in this distribution or at
|
||||||
|
# http://www.rtems.com/license/LICENSE.
|
||||||
|
#
|
||||||
|
|
||||||
|
This file describes the directives and concepts tested by this test set.
|
||||||
|
|
||||||
|
test set name: sp54
|
||||||
|
|
||||||
|
directives:
|
||||||
|
|
||||||
|
rtems_task_set)priority
|
||||||
|
rtems_task_ident
|
||||||
|
|
||||||
|
concepts:
|
||||||
|
|
||||||
|
+ Ensure that using what could be a valid Id but the class has no
|
||||||
|
objects in it is an error.
|
||||||
|
+ Ensure that looking up a name on a class with no objects is an error.
|
||||||
|
objects in it is an error.
|
||||||
|
+ Verify that when configuring a system which starts with the Idle task
|
||||||
|
and uses that as a user task, you can configure your own Classic API
|
||||||
|
Initialization Tasks Table and set to 0 tasks.
|
||||||
4
testsuites/sptests/sp54/sp54.scn
Normal file
4
testsuites/sptests/sp54/sp54.scn
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
*** TEST 54 ***
|
||||||
|
Init - use valid id of API class with no objects
|
||||||
|
Init - lookup name within API class with no objects
|
||||||
|
*** END OF TEST 54 ***
|
||||||
Reference in New Issue
Block a user