summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-29 00:06:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-29 00:06:43 +0000
commit5fc4c4b5ffe5ca8a85335aa2eecc0d6948187aee (patch)
treecc970aa69a4879f0097820a4875de3a47cba77d6 /testsuites
parent2009-09-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-5fc4c4b5ffe5ca8a85335aa2eecc0d6948187aee.tar.bz2
2009-09-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* 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.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/ChangeLog7
-rw-r--r--testsuites/sptests/Makefile.am2
-rw-r--r--testsuites/sptests/configure.ac1
-rw-r--r--testsuites/sptests/spnotepad01/.cvsignore2
-rw-r--r--testsuites/sptests/spnotepad01/Makefile.am28
-rw-r--r--testsuites/sptests/spnotepad01/init.c57
-rw-r--r--testsuites/sptests/spnotepad01/spnotepad01.doc26
-rw-r--r--testsuites/sptests/spnotepad01/spnotepad01.scn4
8 files changed, 126 insertions, 1 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index b8e615f068..a981fb088a 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,5 +1,12 @@
2009-09-28 Joel Sherrill <joel.sherrill@OARcorp.com>
+ * 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 <joel.sherrill@OARcorp.com>
+
* sp09/screen01.c, sp09/screen02.c, sp09/screen03.c, sp09/screen05.c,
sp09/screen09.c, sp09/screen14.c, sp09/sp09.scn, sp28/init.c,
sp28/sp28.scn, sp43/init.c: Add more error cases uncovered by uC5282
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, &note );
+ 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 <rtems/confdefs.h>
+
+/* 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 ***