From c8f8ffdd086af4e70ed6892fb4ee135acfc7505a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 8 Jan 2008 18:27:29 +0000 Subject: 2008-01-08 Joel Sherrill * Makefile.am, configure.ac: Add sp40 to test some cases of dynamic driver registration. * sp40/.cvsignore, sp40/Makefile.am, sp40/init.c, sp40/sp40.scn, sp40/system.h: New files. --- testsuites/sptests/ChangeLog | 7 +++++++ testsuites/sptests/Makefile.am | 2 +- testsuites/sptests/configure.ac | 1 + testsuites/sptests/sp40/.cvsignore | 2 ++ testsuites/sptests/sp40/Makefile.am | 27 ++++++++++++++++++++++++++ testsuites/sptests/sp40/init.c | 38 +++++++++++++++++++++++++++++++++++++ testsuites/sptests/sp40/sp40.scn | 0 testsuites/sptests/sp40/system.h | 38 +++++++++++++++++++++++++++++++++++++ 8 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 testsuites/sptests/sp40/.cvsignore create mode 100644 testsuites/sptests/sp40/Makefile.am create mode 100644 testsuites/sptests/sp40/init.c create mode 100644 testsuites/sptests/sp40/sp40.scn create mode 100644 testsuites/sptests/sp40/system.h (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index d9e8c376e1..cf433aa4cd 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,10 @@ +2008-01-08 Joel Sherrill + + * Makefile.am, configure.ac: Add sp40 to test some cases of dynamic + driver registration. + * sp40/.cvsignore, sp40/Makefile.am, sp40/init.c, sp40/sp40.scn, + sp40/system.h: New files. + 2008-01-07 Joel Sherrill * sp09/screen07.c, sp09/screen12.c, sp09/screen14.c, sp09/sp09.scn diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index e471c7f892..d648002c93 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal ## spfatal is not included for now 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 \ - sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 spsize + sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 spsize DIST_SUBDIRS = $(SUBDIRS) spfatal include $(top_srcdir)/../automake/subdirs.am diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index a84286a8d3..7fcdf6f26d 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -64,6 +64,7 @@ sp36/Makefile sp37/Makefile sp38/Makefile sp39/Makefile +sp40/Makefile spsize/Makefile spfatal/Makefile ]) diff --git a/testsuites/sptests/sp40/.cvsignore b/testsuites/sptests/sp40/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/sp40/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/sp40/Makefile.am b/testsuites/sptests/sp40/Makefile.am new file mode 100644 index 0000000000..ef692123ac --- /dev/null +++ b/testsuites/sptests/sp40/Makefile.am @@ -0,0 +1,27 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = sp40.exe +sp40_exe_SOURCES = init.c system.h + +dist_rtems_tests_DATA = sp40.scn + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +sp40_exe_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(sp40_exe_OBJECTS) $(sp40_exe_LDADD) +LINK_LIBS = $(sp40_exe_LDLIBS) + +sp40.exe$(EXEEXT): $(sp40_exe_OBJECTS) $(sp40_exe_DEPENDENCIES) + @rm -f sp40.exe$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp40/init.c b/testsuites/sptests/sp40/init.c new file mode 100644 index 0000000000..3c5dd7bd4d --- /dev/null +++ b/testsuites/sptests/sp40/init.c @@ -0,0 +1,38 @@ +/* + * IO Manager Dynamic Registration + * + * COPYRIGHT (c) 1989-2007. + * 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$ + */ + +#define TEST_INIT +#include "system.h" + +rtems_task Init( + rtems_task_argument argument +) +{ + puts( "\n\n*** TEST 40 ***" ); + + /* + * Register two drivers to fill up the table + */ + + /* add major = 4 */ + + /* add major = 3 */ + + /* + * Unregister major = 3 to leave slot which is not at + * the end of the Driver Table. + */ + + puts( "*** END OF TEST 40 ***" ); + rtems_test_exit( 0 ); +} diff --git a/testsuites/sptests/sp40/sp40.scn b/testsuites/sptests/sp40/sp40.scn new file mode 100644 index 0000000000..e69de29bb2 diff --git a/testsuites/sptests/sp40/system.h b/testsuites/sptests/sp40/system.h new file mode 100644 index 0000000000..f4226a2688 --- /dev/null +++ b/testsuites/sptests/sp40/system.h @@ -0,0 +1,38 @@ +/* system.h + * + * This include file contains information that is included in every + * function in the test set. + * + * COPYRIGHT (c) 1989-2007. + * 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 + +/* functions */ + +rtems_task Init( + rtems_task_argument argument +); + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +/* more driver slots than are statically configured */ +#define CONFIGURE_MAXIMUM_DRIVERS 4 + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_MAXIMUM_TASKS 1 + +#include + +/* end of include file */ -- cgit v1.2.3