From 5fc4c4b5ffe5ca8a85335aa2eecc0d6948187aee Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 29 Sep 2009 00:06:43 +0000 Subject: 2009-09-28 Joel Sherrill * Makefile.am, configure.ac: Add new test to exercise when notepads are not configured. * spnotepad01/.cvsignore, spnotepad01/Makefile.am, spnotepad01/init.c, spnotepad01/spnotepad01.doc, spnotepad01/spnotepad01.scn: New files. --- testsuites/sptests/ChangeLog | 7 ++++ testsuites/sptests/Makefile.am | 2 +- testsuites/sptests/configure.ac | 1 + testsuites/sptests/spnotepad01/.cvsignore | 2 + testsuites/sptests/spnotepad01/Makefile.am | 28 +++++++++++++ testsuites/sptests/spnotepad01/init.c | 57 ++++++++++++++++++++++++++ testsuites/sptests/spnotepad01/spnotepad01.doc | 26 ++++++++++++ testsuites/sptests/spnotepad01/spnotepad01.scn | 4 ++ 8 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 testsuites/sptests/spnotepad01/.cvsignore create mode 100644 testsuites/sptests/spnotepad01/Makefile.am create mode 100644 testsuites/sptests/spnotepad01/init.c create mode 100644 testsuites/sptests/spnotepad01/spnotepad01.doc create mode 100644 testsuites/sptests/spnotepad01/spnotepad01.scn (limited to 'testsuites') diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index b8e615f068..a981fb088a 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,10 @@ +2009-09-28 Joel Sherrill + + * Makefile.am, configure.ac: Add new test to exercise when notepads are + not configured. + * spnotepad01/.cvsignore, spnotepad01/Makefile.am, spnotepad01/init.c, + spnotepad01/spnotepad01.doc, spnotepad01/spnotepad01.scn: New files. + 2009-09-28 Joel Sherrill * sp09/screen01.c, sp09/screen02.c, sp09/screen03.c, sp09/screen05.c, diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index 791c296e87..a2880eac95 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -14,7 +14,7 @@ SUBDIRS = \ sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \ sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \ sp60 sp61 sp62 sp63 sp64 sp65 sp66 \ - spchain spclockget spcoverage spobjgetnext spprintk spsize \ + spchain spclockget spcoverage spobjgetnext spnotepad01 spprintk spsize \ spstkalloc spthreadq01 spwatchdog spwkspace \ spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \ spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 \ diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index 8c63be4766..a96350c2a3 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -123,6 +123,7 @@ spintrcritical13/Makefile spintrcritical14/Makefile spintrcritical15/Makefile spintrcritical16/Makefile +spnotepad01/Makefile spobjgetnext/Makefile spprintk/Makefile spsize/Makefile diff --git a/testsuites/sptests/spnotepad01/.cvsignore b/testsuites/sptests/spnotepad01/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spnotepad01/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spnotepad01/Makefile.am b/testsuites/sptests/spnotepad01/Makefile.am new file mode 100644 index 0000000000..75daa1521b --- /dev/null +++ b/testsuites/sptests/spnotepad01/Makefile.am @@ -0,0 +1,28 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spnotepad01 +spnotepad01_SOURCES = init.c + +dist_rtems_tests_DATA = spnotepad01.scn +dist_rtems_tests_DATA += spnotepad01.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spnotepad01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(spnotepad01_OBJECTS) $(spnotepad01_LDADD) +LINK_LIBS = $(spnotepad01_LDLIBS) + +spnotepad01$(EXEEXT): $(spnotepad01_OBJECTS) $(spnotepad01_DEPENDENCIES) + @rm -f spnotepad01$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spnotepad01/init.c b/testsuites/sptests/spnotepad01/init.c new file mode 100644 index 0000000000..22029025b5 --- /dev/null +++ b/testsuites/sptests/spnotepad01/init.c @@ -0,0 +1,57 @@ +/* + * 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; + uint32_t note; + + puts( "\n\n*** TEST NOTEPADS DISABLED ***" ); + + puts( "Init - rtems_task_get_note - RTEMS_NOT_CONFIGURED" ); + status = rtems_task_get_note( rtems_task_self(), 0, ¬e ); + fatal_directive_status( + status, + RTEMS_NOT_CONFIGURED, + "rtems_task_get_note not configured" + ); + + puts( "Init - rtems_task_set_note - RTEMS_NOT_CONFIGURED" ); + status = rtems_task_set_note( rtems_task_self(), 0, 1 ); + fatal_directive_status( + status, + RTEMS_NOT_CONFIGURED, + "rtems_task_set_note not configured" + ); + + puts( "*** END OF TEST NOTEPADS DISABLED ***" ); + + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS +#define CONFIGURE_MAXIMUM_TASKS 1 +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include + +/* global variables */ diff --git a/testsuites/sptests/spnotepad01/spnotepad01.doc b/testsuites/sptests/spnotepad01/spnotepad01.doc new file mode 100644 index 0000000000..67318bc500 --- /dev/null +++ b/testsuites/sptests/spnotepad01/spnotepad01.doc @@ -0,0 +1,26 @@ +# +# $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: spnotepad01 + +directives: + + rtems_task_get_note + rtems_task_set_note + +concepts: + ++ Ensure that the proper error code is returned by the notepad services + when notepads are not configured. + is less than the minimum. This is mainly to ensure that a branch is taken. + diff --git a/testsuites/sptests/spnotepad01/spnotepad01.scn b/testsuites/sptests/spnotepad01/spnotepad01.scn new file mode 100644 index 0000000000..ce1d3b235e --- /dev/null +++ b/testsuites/sptests/spnotepad01/spnotepad01.scn @@ -0,0 +1,4 @@ +*** TEST NOTEPADS DISABLED *** +Init - rtems_task_get_note - RTEMS_NOT_CONFIGURED +Init - rtems_task_set_note - RTEMS_NOT_CONFIGURED +*** END OF TEST NOTEPADS DISABLED *** -- cgit v1.2.3