From d5154d0f6a04f3b7ed59d9a09038576fe2640756 Mon Sep 17 00:00:00 2001 From: Aun-Ali Zaidi Date: Wed, 23 Dec 2015 14:44:02 -0600 Subject: api: Remove deprecated Notepads Notepads where a feature of RTEMS' tasks that simply functioned in the same way as POSIX keys or threaded local storage (TLS). They were introduced well before per task variables, which are also deprecated, and were barely used in favor of their POSIX alternatives. In addition to their scarce usage, Notepads took up unnecessary memory. For each task: - 16 32-bit integers were allocated. - A total of 64 bytes per task per thread. This is especially critical in low memory and safety-critical applications. They are also defined as uint32_t, and therefore are not guaranteed to hold a pointer. Lastly, they are not portable solutions for SMP and uniprocessor systems, like POSIX keys and TLS. updates #2493. --- testsuites/PROBLEMS | 2 +- testsuites/libtests/rtems++/System.h | 1 - testsuites/libtests/rtems++/Task1.cc | 69 ------ testsuites/libtests/rtems++/rtems++.scn | 15 -- testsuites/mptests/Makefile.am | 2 +- testsuites/mptests/configure.ac | 3 - testsuites/mptests/mp02/Makefile.am | 4 - testsuites/mptests/mp02/init.c | 61 ----- testsuites/mptests/mp02/node1/Makefile.am | 22 -- testsuites/mptests/mp02/node1/mp02-node1.doc | 43 ---- testsuites/mptests/mp02/node1/mp02-node1.scn | 14 -- testsuites/mptests/mp02/node2/Makefile.am | 22 -- testsuites/mptests/mp02/node2/mp02-node2.doc | 9 - testsuites/mptests/mp02/node2/mp02-node2.scn | 14 -- testsuites/mptests/mp02/system.h | 46 ---- testsuites/mptests/mp02/task1.c | 113 --------- testsuites/sptests/Makefile.am | 2 +- testsuites/sptests/configure.ac | 2 - testsuites/sptests/sp07/init.c | 18 -- testsuites/sptests/sp07/sp07.scn | 9 - testsuites/sptests/sp07/system.h | 2 - testsuites/sptests/sp07/task1.c | 16 -- testsuites/sptests/sp07/task2.c | 17 -- testsuites/sptests/spnotepad01/Makefile.am | 22 -- testsuites/sptests/spnotepad01/init.c | 70 ------ testsuites/sptests/spnotepad01/spnotepad01.doc | 23 -- testsuites/sptests/spnotepad01/spnotepad01.scn | 4 - testsuites/sptests/spnotepad02/Makefile.am | 22 -- testsuites/sptests/spnotepad02/init.c | 65 ------ testsuites/sptests/spnotepad02/spnotepad02.doc | 0 testsuites/sptests/spnotepad02/spnotepad02.scn | 0 testsuites/sptests/sptask_err04/sptask_err04.doc | 4 +- testsuites/sptests/sptask_err04/sptask_err04.scn | 6 - testsuites/sptests/sptask_err04/system.h | 2 - testsuites/sptests/sptask_err04/task1.c | 279 ++++++++--------------- testsuites/tmtests/tm08/system.h | 2 - testsuites/tmtests/tm08/task1.c | 39 ---- testsuites/tmtests/tm08/tm08.doc | 4 +- testsuites/tmtests/tmoverhd/dumrtems.h | 6 - testsuites/tmtests/tmoverhd/testtask.c | 32 --- testsuites/tmtests/tmoverhd/tmoverhd.doc | 2 - testsuites/tmtests/tmtests_plan.csv | 10 - testsuites/tools/generic/sorttimes.in | 2 - 43 files changed, 98 insertions(+), 1002 deletions(-) delete mode 100644 testsuites/mptests/mp02/Makefile.am delete mode 100644 testsuites/mptests/mp02/init.c delete mode 100644 testsuites/mptests/mp02/node1/Makefile.am delete mode 100644 testsuites/mptests/mp02/node1/mp02-node1.doc delete mode 100644 testsuites/mptests/mp02/node1/mp02-node1.scn delete mode 100644 testsuites/mptests/mp02/node2/Makefile.am delete mode 100644 testsuites/mptests/mp02/node2/mp02-node2.doc delete mode 100644 testsuites/mptests/mp02/node2/mp02-node2.scn delete mode 100644 testsuites/mptests/mp02/system.h delete mode 100644 testsuites/mptests/mp02/task1.c delete mode 100644 testsuites/sptests/spnotepad01/Makefile.am delete mode 100644 testsuites/sptests/spnotepad01/init.c delete mode 100644 testsuites/sptests/spnotepad01/spnotepad01.doc delete mode 100644 testsuites/sptests/spnotepad01/spnotepad01.scn delete mode 100644 testsuites/sptests/spnotepad02/Makefile.am delete mode 100644 testsuites/sptests/spnotepad02/init.c delete mode 100644 testsuites/sptests/spnotepad02/spnotepad02.doc delete mode 100644 testsuites/sptests/spnotepad02/spnotepad02.scn (limited to 'testsuites') diff --git a/testsuites/PROBLEMS b/testsuites/PROBLEMS index 8a961fc2c5..5d3a6cc161 100644 --- a/testsuites/PROBLEMS +++ b/testsuites/PROBLEMS @@ -20,7 +20,7 @@ sp02 - Gets through some tests, then attempts to execute code at location 0. sp04 - hangs at end of tests. sp06 - rtems_task_restart of TA3 FAILED -- expected (0) got (4) -sp07, sp14 - hang in middle of tests +sp14 - hang in middle of tests sp13, sp15 - terminate properly, but output at end is missing. sp16 - _Internal_error_Occurred. sp19 - rtems_clock_get FAILED -- expected (0) got (11), and hangs in diff --git a/testsuites/libtests/rtems++/System.h b/testsuites/libtests/rtems++/System.h index 410fccbad8..e787fe21be 100644 --- a/testsuites/libtests/rtems++/System.h +++ b/testsuites/libtests/rtems++/System.h @@ -123,7 +123,6 @@ class Io_during_interrupt #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 #define CONFIGURE_TICKS_PER_TIMESLICE 100 -#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/testsuites/libtests/rtems++/Task1.cc b/testsuites/libtests/rtems++/Task1.cc index c4ce8c4d4b..02c1746e0c 100644 --- a/testsuites/libtests/rtems++/Task1.cc +++ b/testsuites/libtests/rtems++/Task1.cc @@ -259,75 +259,6 @@ void Task1::screen2(void) task_2.set_priority(current_priority, priority); printf("%s, priority was %" PRIirtems_task_priority "\n", task_2.last_status_string(), priority); - uint32_t current_note; - uint32_t note; - - // notepad registers for this object - - printf("%s - get note - ", name_string()); - get_note(0, current_note); - printf("%s, note is %" PRIi32 "\n", last_status_string(), current_note); - - printf("%s - get with bad notepad number - ", name_string()); - get_note(100, current_note); - printf("%s, note is %" PRIi32 "\n", last_status_string(), current_note); - - printf("%s - set note to 0xDEADBEEF - ", name_string()); - set_note(0, 0xDEADBEEF); - printf("%s\n", last_status_string()); - - printf("%s - get note - ", name_string()); - get_note(0, note); - printf("%s, note is 0x%08" PRIX32 "\n", last_status_string(), note); - - printf("%s - set note to original value - ", name_string()); - set_note(0, current_note); - printf("%s\n", last_status_string()); - - // notepad registers for connected object - - printf("%s - connected object get note - ", task_1.name_string()); - task_1.get_note(0, current_note); - printf("%s, notepad is %" PRIi32 "\n", task_1.last_status_string(), current_note); - - printf("%s - connected object get with bad notepad number - ", task_1.name_string()); - task_1.get_note(100, current_note); - printf("%s, note is %" PRIi32 "\n", task_1.last_status_string(), current_note); - - printf("%s - connected object set note to 0xDEADBEEF - ", task_1.name_string()); - task_1.set_note(0, 0xDEADBEEF); - printf("%s\n", task_1.last_status_string()); - - printf("%s - connected object get note - ", task_1.name_string()); - task_1.get_note(0, note); - printf("%s, note is 0x%08" PRIX32 "\n", task_1.last_status_string(), note); - - printf("%s - connected object set note to original value - ", task_1.name_string()); - task_1.set_note(0, current_note); - printf("%s\n", task_1.last_status_string()); - - // notepad registers for self object - - printf("%s - self object get note - ", task_2.name_string()); - task_2.get_note(0, current_note); - printf("%s, note is %" PRIi32 "\n", task_2.last_status_string(), current_note); - - printf("%s - self object get with bad notepad number - ", task_2.name_string()); - task_2.get_note(100, current_note); - printf("%s, note is %" PRIi32 "\n", task_2.last_status_string(), current_note); - - printf("%s - self object set note to 0xDEADBEEF - ", task_2.name_string()); - task_2.set_note(0, 0xDEADBEEF); - printf("%s\n", task_2.last_status_string()); - - printf("%s - self object get note - ", task_2.name_string()); - task_2.get_note(0, note); - printf("%s, notepad is 0x%08" PRIX32 "\n", task_2.last_status_string(), note); - - printf("%s - self object set note to original value - ", task_2.name_string()); - task_2.set_note(0, current_note); - printf("%s\n", task_2.last_status_string()); - printf(" END Task Class test\n"); } diff --git a/testsuites/libtests/rtems++/rtems++.scn b/testsuites/libtests/rtems++/rtems++.scn index f87d0e2906..0ac7c9c172 100644 --- a/testsuites/libtests/rtems++/rtems++.scn +++ b/testsuites/libtests/rtems++/rtems++.scn @@ -44,21 +44,6 @@ SELF - self object get priority - RTEMS[00] successful completion, priority is 1 SELF - self object set priority to 512 - RTEMS[19] invalid thread priority SELF - self object set priority to 25 - RTEMS[00] successful completion SELF - self object set priority to original - RTEMS[00] successful completion, priority was 25 -TA1 - get note - RTEMS[00] successful completion, note is 0 -TA1 - get with bad notepad number - RTEMS[10] number was invalid, note is 0 -TA1 - set note to 0xDEADBEEF - RTEMS[00] successful completion -TA1 - get note - RTEMS[00] successful completion, note is 0xDEADBEEF -TA1 - set note to original value - RTEMS[00] successful completion -TA1 - connected object get note - RTEMS[00] successful completion, notepad is 0 -TA1 - connected object get with bad notepad number - RTEMS[10] number was invalid, note is 0 -TA1 - connected object set note to 0xDEADBEEF - RTEMS[00] successful completion -TA1 - connected object get note - RTEMS[00] successful completion, note is 0xDEADBEEF -TA1 - connected object set note to original value - RTEMS[00] successful completion -SELF - self object get note - RTEMS[00] successful completion, note is 0 -SELF - self object get with bad notepad number - RTEMS[10] number was invalid, note is 0 -SELF - self object set note to 0xDEADBEEF - RTEMS[00] successful completion -SELF - self object get note - RTEMS[00] successful completion, notepad is 0xDEADBEEF -SELF - self object set note to original value - RTEMS[00] successful completion END Task Class test START TaskMode Class test diff --git a/testsuites/mptests/Makefile.am b/testsuites/mptests/Makefile.am index 4bc33df2b9..45889f1835 100644 --- a/testsuites/mptests/Makefile.am +++ b/testsuites/mptests/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I ../aclocal -_SUBDIRS = mp01 mp02 mp03 mp04 mp05 mp06 mp07 mp08 mp09 mp10 mp11 mp12 mp13 \ +_SUBDIRS = mp01 mp03 mp04 mp05 mp06 mp07 mp08 mp09 mp10 mp11 mp12 mp13 \ mp14 include $(top_srcdir)/../automake/test-subdirs.am diff --git a/testsuites/mptests/configure.ac b/testsuites/mptests/configure.ac index 282d97c552..f01cfc1c94 100644 --- a/testsuites/mptests/configure.ac +++ b/testsuites/mptests/configure.ac @@ -35,9 +35,6 @@ AC_CONFIG_FILES([Makefile mp01/Makefile mp01/node1/Makefile mp01/node2/Makefile -mp02/Makefile -mp02/node1/Makefile -mp02/node2/Makefile mp03/Makefile mp03/node1/Makefile mp03/node2/Makefile diff --git a/testsuites/mptests/mp02/Makefile.am b/testsuites/mptests/mp02/Makefile.am deleted file mode 100644 index 08a90da412..0000000000 --- a/testsuites/mptests/mp02/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -SUBDIRS = node1 node2 - -include $(top_srcdir)/../automake/subdirs.am -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/mptests/mp02/init.c b/testsuites/mptests/mp02/init.c deleted file mode 100644 index 7155e88f14..0000000000 --- a/testsuites/mptests/mp02/init.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is a user initialization task and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * 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 - -#define CONFIGURE_INIT -#include "system.h" - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_status_code status; - - printf( - "\n\n*** TEST 2 -- NODE %" PRIu32 " ***\n", - Multiprocessing_configuration.node - ); - - Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); - Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' ); - - puts( "Creating Test_task (Global)" ); - status = rtems_task_create( - Task_name[Multiprocessing_configuration.node], - 1, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_NO_PREEMPT, - RTEMS_GLOBAL, - &Task_id[ 1 ] - ); - directive_failed( status, "rtems_task_create" ); - - puts( "Starting Test_task (Global)" ); - status = rtems_task_start( Task_id[ 1 ], Test_task, 0 ); - directive_failed( status, "rtems_task_start" ); - - puts( "Deleting initialization task" ); - status = rtems_task_delete( RTEMS_SELF ); - directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); -} diff --git a/testsuites/mptests/mp02/node1/Makefile.am b/testsuites/mptests/mp02/node1/Makefile.am deleted file mode 100644 index f3ae2b4171..0000000000 --- a/testsuites/mptests/mp02/node1/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -rtems_tests_PROGRAMS = mp02-node1 -mp02_node1_SOURCES = ../init.c ../task1.c ../system.h - -dist_rtems_tests_DATA = mp02-node1.scn -dist_rtems_tests_DATA += mp02-node1.doc - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - -AM_CPPFLAGS += -DNODE_NUMBER=1 -I$(srcdir)/.. - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include - -LINK_OBJS = $(mp02_node1_OBJECTS) -LINK_LIBS = $(mp02_node1_LDLIBS) - -mp02-node1$(EXEEXT): $(mp02_node1_OBJECTS) $(mp02_node1_DEPENDENCIES) - @rm -f mp02-node1$(EXEEXT) - $(make-exe) - -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/mptests/mp02/node1/mp02-node1.doc b/testsuites/mptests/mp02/node1/mp02-node1.doc deleted file mode 100644 index 53959a2f15..0000000000 --- a/testsuites/mptests/mp02/node1/mp02-node1.doc +++ /dev/null @@ -1,43 +0,0 @@ -# COPYRIGHT (c) 1989-1999. -# 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. -# - - -This file describes the directives and concepts tested by this test set. - -test set name: test51 - -directives: - ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident, - tm_set, tm_get, tm_wkafter, t_delete, t_restart, t_getreg, t_setreg - -concepts: - - a. Verifies system can create and start both the executive's system - initialization and idle task. - - b. Verifies can print strings to the CRT on port 2 of the mvme136 board - using Print and Println in the board support package. - - c. Verifies interrupt handler can handler a task switch from an interrupt - as specified with the i_return directive. - - d. Verifies executive initialization performed correctly. - - e. Verifies that a task can get the task identification number of itself. - - f. Verifies that a task can get the task identification number - of another task. - - g. Verifies that a task can delete itself or another task. - - h. Verifies that errors are returned in the following situations: - 1) when attempting to delete a remote task. - 2) when attempting to start a remote task. - 3) when attempting to restart a remote task. - - i. Verifies that a remote task's registers can be set and read. diff --git a/testsuites/mptests/mp02/node1/mp02-node1.scn b/testsuites/mptests/mp02/node1/mp02-node1.scn deleted file mode 100644 index 72fdefe69d..0000000000 --- a/testsuites/mptests/mp02/node1/mp02-node1.scn +++ /dev/null @@ -1,14 +0,0 @@ -*** TEST 2 -- NODE 1 *** -Creating Test_task (Global) -Starting Test_task (Global) -Deleting initialization task -Remote task's name is : 222 -Getting TID of remote task (all nodes) -Getting TID of remote task (1 node) -rtems_task_delete of remote task returned the correct error -rtems_task_start of remote task returned the correct error -rtems_task_restart of remote task returned the correct error -Setting notepad 1 of the remote task to 1 -Getting a notepad of the remote task -Remote notepad set and read correctly -*** END OF TEST 2 *** diff --git a/testsuites/mptests/mp02/node2/Makefile.am b/testsuites/mptests/mp02/node2/Makefile.am deleted file mode 100644 index 107d845653..0000000000 --- a/testsuites/mptests/mp02/node2/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -rtems_tests_PROGRAMS = mp02-node2 -mp02_node2_SOURCES = ../init.c ../task1.c ../system.h - -dist_rtems_tests_DATA = mp02-node2.scn -dist_rtems_tests_DATA += mp02-node2.doc - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - -AM_CPPFLAGS += -DNODE_NUMBER=2 -I$(srcdir)/.. - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include - -LINK_OBJS = $(mp02_node2_OBJECTS) -LINK_LIBS = $(mp02_node2_LDLIBS) - -mp02-node2$(EXEEXT): $(mp02_node2_OBJECTS) $(mp02_node2_DEPENDENCIES) - @rm -f mp02-node2$(EXEEXT) - $(make-exe) - -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/mptests/mp02/node2/mp02-node2.doc b/testsuites/mptests/mp02/node2/mp02-node2.doc deleted file mode 100644 index 981286480f..0000000000 --- a/testsuites/mptests/mp02/node2/mp02-node2.doc +++ /dev/null @@ -1,9 +0,0 @@ -# COPYRIGHT (c) 1989-1999. -# 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. -# - - diff --git a/testsuites/mptests/mp02/node2/mp02-node2.scn b/testsuites/mptests/mp02/node2/mp02-node2.scn deleted file mode 100644 index 233a910999..0000000000 --- a/testsuites/mptests/mp02/node2/mp02-node2.scn +++ /dev/null @@ -1,14 +0,0 @@ -*** TEST 2 -- NODE 2 *** -Creating Test_task (Global) -Starting Test_task (Global) -Deleting initialization task -Remote task's name is : 111 -Getting TID of remote task (all nodes) -Getting TID of remote task (1 node) -rtems_task_delete of remote task returned the correct error -rtems_task_start of remote task returned the correct error -rtems_task_restart of remote task returned the correct error -Setting notepad 2 of the remote task to 2 -Getting a notepad of the remote task -Remote notepad set and read correctly -*** END OF TEST 2 *** diff --git a/testsuites/mptests/mp02/system.h b/testsuites/mptests/mp02/system.h deleted file mode 100644 index 69025d4107..0000000000 --- a/testsuites/mptests/mp02/system.h +++ /dev/null @@ -1,46 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * 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. - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task Test_task( - rtems_task_argument argument -); - -/* configuration information */ - -#define CONFIGURE_MP_APPLICATION - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS - -#define CONFIGURE_MAXIMUM_TASKS 2 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#include - -/* variables */ - -TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */ -TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ - -/* end of include file */ diff --git a/testsuites/mptests/mp02/task1.c b/testsuites/mptests/mp02/task1.c deleted file mode 100644 index fbdcc0d65b..0000000000 --- a/testsuites/mptests/mp02/task1.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Test_task - * - * This task tests the rtems_task_set_note directive on a remote task and that - * errors are returned when attempting to delete, start, or restart - * a remote task. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * 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.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "system.h" - -extern rtems_multiprocessing_table Multiprocessing_configuration; - -rtems_task Test_task( - rtems_task_argument argument -) -{ - rtems_id tid; - rtems_status_code status; - uint32_t remote_node; - rtems_id remote_tid; - rtems_id test_tid; - uint32_t note; - uint32_t tmpNode; - - status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); - - remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1; - printf( "Remote task's name is : " ); - put_name( Task_name[ remote_node ], TRUE ); - - puts( "Getting TID of remote task (all nodes)" ); - do { - status = rtems_task_ident( - Task_name[ remote_node ], - RTEMS_SEARCH_ALL_NODES, - &remote_tid - ); - } while ( status != RTEMS_SUCCESSFUL ); - - directive_failed( status, "rtems_task_ident" ); - - puts( "Getting TID of remote task (1 node)" ); - status = rtems_task_ident( Task_name[ remote_node ], remote_node, &test_tid ); - directive_failed( status, "rtems_task_ident" ); - - if ( test_tid != remote_tid ) { - puts( "rtems_task_ident tid's do not match!!" ); - rtems_fatal_error_occurred( status ); - } - - status = rtems_task_delete( remote_tid ); - fatal_directive_status( - status, - RTEMS_ILLEGAL_ON_REMOTE_OBJECT, - "rtems_task_delete of remote task" - ); - puts( "rtems_task_delete of remote task returned the correct error" ); - - status = rtems_task_start( remote_tid, Test_task, 0 ); - fatal_directive_status( - status, - RTEMS_ILLEGAL_ON_REMOTE_OBJECT, - "rtems_task_start of remote task" - ); - puts( "rtems_task_start of remote task returned the correct error" ); - - status = rtems_task_restart( remote_tid, 0 ); - fatal_directive_status( - status, - RTEMS_ILLEGAL_ON_REMOTE_OBJECT, - "rtems_task_restart of remote task" - ); - puts( "rtems_task_restart of remote task returned the correct error" ); - - tmpNode = rtems_object_id_get_node(tid); - printf( "Setting notepad %" PRId32 " of the remote task to %" PRId32 "\n", tmpNode, tmpNode ); - status = rtems_task_set_note( remote_tid, tmpNode, tmpNode ); - directive_failed( status, "rtems_task_set_note" ); - - puts( "Getting a notepad of the remote task" ); - status = rtems_task_get_note( remote_tid, tmpNode, ¬e ); - directive_failed( status, "rtems_task_get_note" ); - - if ( note == tmpNode ) - puts( "Remote notepad set and read correctly" ); - else - printf( - "FAILURE!! Remote notepad was not set and read correctly (%" PRId32 ", %" PRId32 ")\n", - note, - tmpNode - ); - - status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); - directive_failed( status, "rtems_task_wake_after" ); - - puts( "*** END OF TEST 2 ***" ); - rtems_test_exit( 0 ); -} diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index dac14e1408..c5210a5ab9 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 spnotepad02 spprintk spprivenv01 sprbtree01 spsize spstkalloc \ + 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 6448e037c4..e46f6fa5a5 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -222,8 +222,6 @@ spmkdir/Makefile 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 0211a94e3a..d5b606d12a 100644 --- a/testsuites/sptests/sp07/init.c +++ b/testsuites/sptests/sp07/init.c @@ -210,24 +210,6 @@ rtems_task Init( directive_failed( status, "rtems_task_restart of TA3" ); assert_extension_counts( &Task_restarted[ 0 ], 0x0 ); - /* - * 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 77a9b24521..414b46754e 100644 --- a/testsuites/sptests/sp07/sp07.scn +++ b/testsuites/sptests/sp07/sp07.scn @@ -10,20 +10,11 @@ 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 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 TA1 - rtems_task_set_priority - get initial priority of self: 04 -TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 04 -TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: 03 TA1 - rtems_task_set_priority - set TA2's priority: 03 -TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 03 -TA2 - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8: 02 TA2 - rtems_task_set_priority - set TA1's priority: 02 -TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 02 -TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: 01 TA1 - rtems_task_set_priority - set TA2's priority: 01 -TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 01 TA2 - rtems_task_suspend - suspend TA1 TA2 - rtems_task_set_priority - set priority of TA1 ( blocked ) TA4 - exitting task diff --git a/testsuites/sptests/sp07/system.h b/testsuites/sptests/sp07/system.h index c5374553d5..8bea0fb7f5 100644 --- a/testsuites/sptests/sp07/system.h +++ b/testsuites/sptests/sp07/system.h @@ -64,8 +64,6 @@ void Task_exit_extension( #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS - #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 2 #define CONFIGURE_TICKS_PER_TIMESLICE 100 diff --git a/testsuites/sptests/sp07/task1.c b/testsuites/sptests/sp07/task1.c index 18c6375473..c03bea24b4 100644 --- a/testsuites/sptests/sp07/task1.c +++ b/testsuites/sptests/sp07/task1.c @@ -44,14 +44,6 @@ rtems_task Task_1( ); while( FOREVER ) { - status = rtems_task_get_note( my_id, RTEMS_NOTEPAD_8, &the_priority ); - directive_failed( status, "rtems_task_get_note" ); - printf( - "TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - " - "current priority: %02" PRIdrtems_task_priority "\n", - the_priority - ); - if ( --the_priority == 0 ) { puts( "TA1 - rtems_task_suspend - suspend TA2" ); status = rtems_task_suspend( Task_id[ 2 ] ); @@ -68,14 +60,6 @@ rtems_task Task_1( directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); } - printf( - "TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: " - "%02" PRIdrtems_task_priority "\n", - the_priority - ); - status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, the_priority ); - directive_failed( status, "rtems_task_set_note" ); - printf( "TA1 - rtems_task_set_priority - set TA2's priority: " "%02" PRIdrtems_task_priority "\n", diff --git a/testsuites/sptests/sp07/task2.c b/testsuites/sptests/sp07/task2.c index 11165ee73b..4254a94710 100644 --- a/testsuites/sptests/sp07/task2.c +++ b/testsuites/sptests/sp07/task2.c @@ -27,15 +27,6 @@ rtems_task Task_2( rtems_task_priority previous_priority; while( FOREVER ) { - - status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_8, &the_priority ); - directive_failed( status, "rtems_task_get_note" ); - printf( - "TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - " - "current priority: %02" PRIdrtems_task_priority "\n", - the_priority - ); - if ( --the_priority == 0 ) { puts( "TA2 - rtems_task_suspend - suspend TA1" ); status = rtems_task_suspend( Task_id[ 1 ] ); @@ -58,14 +49,6 @@ rtems_task Task_2( } else { - printf( - "TA2 - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8: " - "%02" PRIdrtems_task_priority "\n", - the_priority - ); - status = rtems_task_set_note(Task_id[ 1 ], RTEMS_NOTEPAD_8, the_priority); - directive_failed( status, "rtems_task_set_note" ); - printf( "TA2 - rtems_task_set_priority - set TA1's priority: " "%02" PRIdrtems_task_priority "\n", diff --git a/testsuites/sptests/spnotepad01/Makefile.am b/testsuites/sptests/spnotepad01/Makefile.am deleted file mode 100644 index e017ac1da2..0000000000 --- a/testsuites/sptests/spnotepad01/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ - -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 - - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include - -LINK_OBJS = $(spnotepad01_OBJECTS) -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 deleted file mode 100644 index 965d69dd2c..0000000000 --- a/testsuites/sptests/spnotepad01/init.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "tmacros.h" - -const char rtems_test_name[] = "SPNOTEPAD 1"; - -/* - * 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; - uint32_t note; - - TEST_BEGIN(); - - 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" - ); - - 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_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include - -/* global variables */ diff --git a/testsuites/sptests/spnotepad01/spnotepad01.doc b/testsuites/sptests/spnotepad01/spnotepad01.doc deleted file mode 100644 index d90c4e197b..0000000000 --- a/testsuites/sptests/spnotepad01/spnotepad01.doc +++ /dev/null @@ -1,23 +0,0 @@ -# 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.org/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 deleted file mode 100644 index ce1d3b235e..0000000000 --- a/testsuites/sptests/spnotepad01/spnotepad01.scn +++ /dev/null @@ -1,4 +0,0 @@ -*** TEST NOTEPADS DISABLED *** -Init - rtems_task_get_note - RTEMS_NOT_CONFIGURED -Init - rtems_task_set_note - RTEMS_NOT_CONFIGURED -*** END OF TEST NOTEPADS DISABLED *** diff --git a/testsuites/sptests/spnotepad02/Makefile.am b/testsuites/sptests/spnotepad02/Makefile.am deleted file mode 100644 index 943afceed9..0000000000 --- a/testsuites/sptests/spnotepad02/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ - -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 deleted file mode 100644 index 0c9ba6e3d3..0000000000 --- a/testsuites/sptests/spnotepad02/init.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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 - -/* global variables */ diff --git a/testsuites/sptests/spnotepad02/spnotepad02.doc b/testsuites/sptests/spnotepad02/spnotepad02.doc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/testsuites/sptests/spnotepad02/spnotepad02.scn b/testsuites/sptests/spnotepad02/spnotepad02.scn deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/testsuites/sptests/sptask_err04/sptask_err04.doc b/testsuites/sptests/sptask_err04/sptask_err04.doc index 3773cb61ec..e64fd1d946 100644 --- a/testsuites/sptests/sptask_err04/sptask_err04.doc +++ b/testsuites/sptests/sptask_err04/sptask_err04.doc @@ -12,8 +12,8 @@ This file describes the directives and concepts tested by this test set. test set name: sptask_err04 directives: - t_delete, t_getnote, t_ident, t_restart, t_resume, t_setpriority, - t_mode, t_start, t_suspend, + t_delete, t_ident, t_restart, t_resume, t_setpriority, t_mode, + t_start, t_suspend, concepts: diff --git a/testsuites/sptests/sptask_err04/sptask_err04.scn b/testsuites/sptests/sptask_err04/sptask_err04.scn index c21cce3620..54bea059f0 100644 --- a/testsuites/sptests/sptask_err04/sptask_err04.scn +++ b/testsuites/sptests/sptask_err04/sptask_err04.scn @@ -1,10 +1,6 @@ *** TEST TASK ERROR 04 *** TA1 - rtems_task_is_suspended - RTEMS_INVALID_ID TA1 - rtems_task_delete - RTEMS_INVALID_ID -TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS -TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER -TA1 - rtems_task_get_note - RTEMS_INVALID_ID -TA1 - rtems_task_get_note - RTEMS_INVALID_ID TA1 - rtems_task_ident - RTEMS_INVALID_ADDRESS TA1 - rtems_task_ident - global RTEMS_INVALID_NAME TA1 - rtems_task_ident - local RTEMS_INVALID_NAME @@ -15,8 +11,6 @@ TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE TA1 - rtems_task_set_priority - RTEMS_INVALID_ADDRESS TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY TA1 - rtems_task_set_priority - RTEMS_INVALID_ID -TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER -TA1 - rtems_task_set_note - RTEMS_INVALID_ID TA1 - rtems_task_start - RTEMS_INVALID_ID TA1 - rtems_task_start - RTEMS_INCORRECT_STATE TA1 - rtems_task_suspend - RTEMS_INVALID_ID diff --git a/testsuites/sptests/sptask_err04/system.h b/testsuites/sptests/sptask_err04/system.h index a5cd32ac2f..60a7652444 100644 --- a/testsuites/sptests/sptask_err04/system.h +++ b/testsuites/sptests/sptask_err04/system.h @@ -29,8 +29,6 @@ rtems_task Task_1( #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS - #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/testsuites/sptests/sptask_err04/task1.c b/testsuites/sptests/sptask_err04/task1.c index f7bd98b979..c84ef826a2 100644 --- a/testsuites/sptests/sptask_err04/task1.c +++ b/testsuites/sptests/sptask_err04/task1.c @@ -27,7 +27,6 @@ rtems_task Task_1( rtems_task_argument argument ) { - uint32_t notepad_value; rtems_id self_id; rtems_task_priority previous_priority; rtems_status_code status; @@ -50,203 +49,109 @@ rtems_task Task_1( ); puts( "TA1 - rtems_task_delete - RTEMS_INVALID_ID" ); - /** START OF NOTEPAD TESTS **/ - - /* - * 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" - - /* NULL return */ - status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_FIRST, NULL ); - fatal_directive_status( - status, - RTEMS_INVALID_ADDRESS, - "rtems_task_get_note with NULL param" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS" ); - - /* note too high */ - status = rtems_task_get_note( RTEMS_SELF, 100, ¬epad_value ); - fatal_directive_status( - status, - RTEMS_INVALID_NUMBER, - "rtems_task_get_note with illegal notepad" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER" ); - - /* bad Id */ - status = rtems_task_get_note( 100, RTEMS_NOTEPAD_LAST, ¬epad_value ); - fatal_directive_status( - status, - RTEMS_INVALID_ID, - "rtems_task_get_note with illegal id" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" ); - - /* unused Id so invalid now */ - status = rtems_task_get_note( - Task_id[ 0 ], - RTEMS_NOTEPAD_LAST, - ¬epad_value - ); - fatal_directive_status( - status, - RTEMS_INVALID_ID, - "rtems_task_get_note with illegal id" - ); - puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" ); - - status = rtems_task_get_note( - _RTEMS_tasks_Information.Objects.minimum_id + (3L<