summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2015-03-14 10:48:00 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-03-17 10:05:04 -0500
commit979bda958721340c64cdd5ccbab7d76b4a7930c9 (patch)
tree2e083972c933a35167fcab08ad4ac2cbf8b1de48
parenttestsuites/samples/minimum/init.c: Notepads no longer need to be disabled (diff)
downloadrtems-979bda958721340c64cdd5ccbab7d76b4a7930c9.tar.bz2
tm07: Split some code into new spnotepad02.
Use of deprecated notepads in sp07 needs further work. Updates #2305.
-rw-r--r--testsuites/sptests/Makefile.am2
-rw-r--r--testsuites/sptests/configure.ac1
-rw-r--r--testsuites/sptests/sp07/init.c36
-rw-r--r--testsuites/sptests/sp07/sp07.scn2
-rw-r--r--testsuites/sptests/sp07/task1.c5
-rw-r--r--testsuites/sptests/sp07/task2.c5
-rw-r--r--testsuites/sptests/spnotepad02/Makefile.am22
-rw-r--r--testsuites/sptests/spnotepad02/init.c65
-rw-r--r--testsuites/sptests/spnotepad02/spnotepad02.doc0
-rw-r--r--testsuites/sptests/spnotepad02/spnotepad02.scn0
10 files changed, 116 insertions, 22 deletions
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index bcb9326c00..0d1e687aaf 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -12,7 +12,7 @@ _SUBDIRS = \
sp60 sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
sp70 sp71 sp72 sp73 sp74 sp75 sp76 sp77 sp2038 \
spassoc01 spchain spclockget spcoverage spobjgetnext \
- spnotepad01 spprintk spprivenv01 sprbtree01 spsize spstkalloc \
+ spnotepad01 spnotepad02 spprintk spprivenv01 sprbtree01 spsize spstkalloc \
spstkalloc02 spthreadq01 spwatchdog spwkspace \
sperror01 sperror02 sperror03 \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 9534b4ef37..eef901b37b 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -209,6 +209,7 @@ spmountmgr01/Makefile
spmsgq_err01/Makefile
spmsgq_err02/Makefile
spnotepad01/Makefile
+spnotepad02/Makefile
spnsext01/Makefile
spobjgetnext/Makefile
sppagesize/Makefile
diff --git a/testsuites/sptests/sp07/init.c b/testsuites/sptests/sp07/init.c
index c08c5c4c18..0211a94e3a 100644
--- a/testsuites/sptests/sp07/init.c
+++ b/testsuites/sptests/sp07/init.c
@@ -210,25 +210,23 @@ rtems_task Init(
directive_failed( status, "rtems_task_restart of TA3" );
assert_extension_counts( &Task_restarted[ 0 ], 0x0 );
- status = rtems_task_set_note( rtems_task_self(), RTEMS_NOTEPAD_4, 32 );
- directive_failed( status, "task_set_node of Self id" );
- printf( "INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 " );
- puts ( "to TA1's priority: 04" );
-
- status = rtems_task_set_note( RTEMS_SELF, RTEMS_NOTEPAD_4, 32 );
- directive_failed( status, "task_set_node of Self 0" );
- printf( "INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 " );
- puts ( "to TA1's priority: 04" );
-
- status = rtems_task_set_note( Task_id[ 1 ], RTEMS_NOTEPAD_8, 4 );
- directive_failed( status, "task_set_node of TA1" );
- printf( "INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 " );
- puts ( "to TA1's priority: 04" );
-
- status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, 4 );
- directive_failed( status, "task_set_node of TA2" );
- printf( "INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 " );
- puts ( "to TA2's priority: 04");
+ /*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+ status = rtems_task_set_note( Task_id[ 1 ], RTEMS_NOTEPAD_8, 4 );
+ directive_failed( status, "task_set_node of TA1" );
+ printf( "INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 " );
+ puts ( "to TA1's priority: 04" );
+
+ status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, 4 );
+ directive_failed( status, "task_set_node of TA2" );
+ printf( "INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 " );
+ puts ( "to TA2's priority: 04");
+
+ #pragma GCC diagnostic pop
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
diff --git a/testsuites/sptests/sp07/sp07.scn b/testsuites/sptests/sp07/sp07.scn
index 0fe6f296c4..77a9b24521 100644
--- a/testsuites/sptests/sp07/sp07.scn
+++ b/testsuites/sptests/sp07/sp07.scn
@@ -10,8 +10,6 @@ rtems_extension_ident -- OK
rtems_extension_ident - bad name -- RTEMS_INVALID_NAME
rtems_extension_ident - bad name -- RTEMS_INVALID_ADDRESS
rtems_extension_create - harmless -- OK
-INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 to TA1's priority: 04
-INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 to TA1's priority: 04
INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 to TA1's priority: 04
INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 to TA2's priority: 04
<pause>
diff --git a/testsuites/sptests/sp07/task1.c b/testsuites/sptests/sp07/task1.c
index 15bc7a17ca..18c6375473 100644
--- a/testsuites/sptests/sp07/task1.c
+++ b/testsuites/sptests/sp07/task1.c
@@ -13,6 +13,11 @@
#include "system.h"
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
rtems_task Task_1(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/sp07/task2.c b/testsuites/sptests/sp07/task2.c
index 6451fffb07..11165ee73b 100644
--- a/testsuites/sptests/sp07/task2.c
+++ b/testsuites/sptests/sp07/task2.c
@@ -13,6 +13,11 @@
#include "system.h"
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
rtems_task Task_2(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/spnotepad02/Makefile.am b/testsuites/sptests/spnotepad02/Makefile.am
new file mode 100644
index 0000000000..943afceed9
--- /dev/null
+++ b/testsuites/sptests/spnotepad02/Makefile.am
@@ -0,0 +1,22 @@
+
+rtems_tests_PROGRAMS = spnotepad02
+spnotepad02_SOURCES = init.c
+
+dist_rtems_tests_DATA = spnotepad02.scn
+dist_rtems_tests_DATA += spnotepad02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spnotepad02_OBJECTS)
+LINK_LIBS = $(spnotepad02_LDLIBS)
+
+spnotepad02$(EXEEXT): $(spnotepad02_OBJECTS) $(spnotepad02_DEPENDENCIES)
+ @rm -f spnotepad02$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spnotepad02/init.c b/testsuites/sptests/spnotepad02/init.c
new file mode 100644
index 0000000000..0c9ba6e3d3
--- /dev/null
+++ b/testsuites/sptests/spnotepad02/init.c
@@ -0,0 +1,65 @@
+/*
+ * COPYRIGHT (c) 1989-2015.
+ * 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.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "SPNOTEPAD 2";
+
+/*
+ * We know this is deprecated and don't want a warning on every BSP built.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
+rtems_task Init(
+ rtems_task_argument ignored
+)
+{
+ rtems_status_code status;
+
+ TEST_BEGIN();
+
+ status = rtems_task_set_note( rtems_task_self(), RTEMS_NOTEPAD_4, 32 );
+ directive_failed( status, "task_set_node of Self id" );
+ printf( "INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 " );
+ puts ( "to TA1's priority: 04" );
+
+ status = rtems_task_set_note( RTEMS_SELF, RTEMS_NOTEPAD_4, 32 );
+ directive_failed( status, "task_set_node of Self 0" );
+ printf( "INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 " );
+ puts ( "to TA1's priority: 04" );
+
+
+ TEST_END();
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/* global variables */
diff --git a/testsuites/sptests/spnotepad02/spnotepad02.doc b/testsuites/sptests/spnotepad02/spnotepad02.doc
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuites/sptests/spnotepad02/spnotepad02.doc
diff --git a/testsuites/sptests/spnotepad02/spnotepad02.scn b/testsuites/sptests/spnotepad02/spnotepad02.scn
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuites/sptests/spnotepad02/spnotepad02.scn