summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-28 06:30:35 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-02-02 15:01:21 +0100
commit2c12262f9a8fe7975556729f0574fab8d5a792f5 (patch)
tree0a4a0bea0900fd682d40fb1d628c5e922aab85b8 /testsuites
parentlibblock: Use self-contained mutex and cond var (diff)
downloadrtems-2c12262f9a8fe7975556729f0574fab8d5a792f5.tar.bz2
termios: Use self-contained objects
Update #2840.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/termios01/init.c7
-rw-r--r--testsuites/sptests/Makefile.am2
-rw-r--r--testsuites/sptests/configure.ac4
-rw-r--r--testsuites/sptests/spfatal17/Makefile.am24
-rw-r--r--testsuites/sptests/spfatal17/spfatal17.doc19
-rw-r--r--testsuites/sptests/spfatal17/spfatal17.scn3
-rw-r--r--testsuites/sptests/spfatal17/testcase.h27
-rw-r--r--testsuites/sptests/spfatal18/Makefile.am24
-rw-r--r--testsuites/sptests/spfatal18/spfatal18.doc19
-rw-r--r--testsuites/sptests/spfatal18/spfatal18.scn3
-rw-r--r--testsuites/sptests/spfatal18/testcase.h27
-rw-r--r--testsuites/sptests/spfatal19/Makefile.am24
-rw-r--r--testsuites/sptests/spfatal19/spfatal19.doc19
-rw-r--r--testsuites/sptests/spfatal19/spfatal19.scn3
-rw-r--r--testsuites/sptests/spfatal19/testcase.h27
-rw-r--r--testsuites/sptests/spfatal20/Makefile.am24
-rw-r--r--testsuites/sptests/spfatal20/spfatal20.doc19
-rw-r--r--testsuites/sptests/spfatal20/spfatal20.scn3
-rw-r--r--testsuites/sptests/spfatal20/testcase.h24
-rw-r--r--testsuites/sptests/spfatal_support/system.h4
20 files changed, 5 insertions, 301 deletions
diff --git a/testsuites/libtests/termios01/init.c b/testsuites/libtests/termios01/init.c
index 6f5e4f657c..1fd2c5789c 100644
--- a/testsuites/libtests/termios01/init.c
+++ b/testsuites/libtests/termios01/init.c
@@ -635,10 +635,11 @@ static rtems_status_code test_early_device_install(
* after this test case.
*/
for (i = 0; i < 4; ++i) {
- errno = 0;
fd = open( &dev[0], O_RDWR );
- rtems_test_assert( fd == -1 );
- rtems_test_assert( errno == ENXIO );
+ rtems_test_assert( fd == i );
+
+ rv = close( fd );
+ rtems_test_assert( rv == 0 );
}
rv = unlink( &dev[0] );
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 561d2d73e0..9bd53c58a2 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -17,7 +17,7 @@ _SUBDIRS = \
sperror01 sperror02 sperror03 \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
- spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
+ spfatal15 spfatal16 \
spfatal24 spfatal25 spfatal27\
spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
spfreechain01 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 54fb8f53c6..36ae9ac56a 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -187,10 +187,6 @@ spfatal13/Makefile
spfatal14/Makefile
spfatal15/Makefile
spfatal16/Makefile
-spfatal17/Makefile
-spfatal18/Makefile
-spfatal19/Makefile
-spfatal20/Makefile
spfatal24/Makefile
spfatal25/Makefile
spfatal27/Makefile
diff --git a/testsuites/sptests/spfatal17/Makefile.am b/testsuites/sptests/spfatal17/Makefile.am
deleted file mode 100644
index 8e7200b1cd..0000000000
--- a/testsuites/sptests/spfatal17/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-
-rtems_tests_PROGRAMS = spfatal17
-spfatal17_SOURCES = ../spfatal_support/init.c \
- ../spfatal_support/consume_sems.c \
- ../spfatal_support/system.h testcase.h
-
-dist_rtems_tests_DATA = spfatal17.scn
-dist_rtems_tests_DATA += spfatal17.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
-AM_CPPFLAGS += -DSEMAPHORES_REMAINING=3
-
-LINK_OBJS = $(spfatal17_OBJECTS)
-LINK_LIBS = $(spfatal17_LDLIBS)
-
-spfatal17$(EXEEXT): $(spfatal17_OBJECTS) $(spfatal17_DEPENDENCIES)
- @rm -f spfatal17$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal17/spfatal17.doc b/testsuites/sptests/spfatal17/spfatal17.doc
deleted file mode 100644
index 921d8a4aee..0000000000
--- a/testsuites/sptests/spfatal17/spfatal17.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-# COPYRIGHT (c) 1989-2010.
-# 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: spfatal17
-
-directives:
-
- rtems_termios_open
-
-concepts:
-
-+ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal17/spfatal17.scn b/testsuites/sptests/spfatal17/spfatal17.scn
deleted file mode 100644
index 5f41a1d5c0..0000000000
--- a/testsuites/sptests/spfatal17/spfatal17.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL 17 ***
-Fatal error (termios sem create #2) hit
-*** END OF TEST FATAL 17 ***
diff --git a/testsuites/sptests/spfatal17/testcase.h b/testsuites/sptests/spfatal17/testcase.h
deleted file mode 100644
index a82edca551..0000000000
--- a/testsuites/sptests/spfatal17/testcase.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2010.
- * 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.
- */
-
-/* generate fatal errors in termios.c
- * rtems_semaphore_create( rtems_build_name ('T', 'R', 'x', c),...);
- */
-
-#define FATAL_ERROR_TEST_NAME "17"
-#define FATAL_ERROR_DESCRIPTION "termios sem create #2"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
-
-#define FATAL_USE_TERMIOS_CONSOLE
-
-#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
- CONSUME_SEMAPHORE_DRIVERS
-
-void force_error()
-{
- /* we will not run this far */
-}
diff --git a/testsuites/sptests/spfatal18/Makefile.am b/testsuites/sptests/spfatal18/Makefile.am
deleted file mode 100644
index 8e7e83a8bf..0000000000
--- a/testsuites/sptests/spfatal18/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-
-rtems_tests_PROGRAMS = spfatal18
-spfatal18_SOURCES = ../spfatal_support/init.c \
- ../spfatal_support/consume_sems.c \
- ../spfatal_support/system.h testcase.h
-
-dist_rtems_tests_DATA = spfatal18.scn
-dist_rtems_tests_DATA += spfatal18.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
-AM_CPPFLAGS += -DSEMAPHORES_REMAINING=2
-
-LINK_OBJS = $(spfatal18_OBJECTS)
-LINK_LIBS = $(spfatal18_LDLIBS)
-
-spfatal18$(EXEEXT): $(spfatal18_OBJECTS) $(spfatal18_DEPENDENCIES)
- @rm -f spfatal18$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal18/spfatal18.doc b/testsuites/sptests/spfatal18/spfatal18.doc
deleted file mode 100644
index ffc0c51902..0000000000
--- a/testsuites/sptests/spfatal18/spfatal18.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-# COPYRIGHT (c) 1989-2010.
-# 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: spfatal18
-
-directives:
-
- rtems_termios_open
-
-concepts:
-
-+ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal18/spfatal18.scn b/testsuites/sptests/spfatal18/spfatal18.scn
deleted file mode 100644
index 8912a5829e..0000000000
--- a/testsuites/sptests/spfatal18/spfatal18.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL 18 ***
-Fatal error (termios sem create #3) hit
-*** END OF TEST FATAL 18 ***
diff --git a/testsuites/sptests/spfatal18/testcase.h b/testsuites/sptests/spfatal18/testcase.h
deleted file mode 100644
index ce1310ee35..0000000000
--- a/testsuites/sptests/spfatal18/testcase.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2010.
- * 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.
- */
-
-/* generate fatal errors in termios.c
- * rtems_semaphore_create( rtems_build_name ('T', 'R', 'o', c),...);
- */
-
-#define FATAL_ERROR_TEST_NAME "18"
-#define FATAL_ERROR_DESCRIPTION "termios sem create #3"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
-
-#define FATAL_USE_TERMIOS_CONSOLE
-
-#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
- CONSUME_SEMAPHORE_DRIVERS
-
-void force_error()
-{
- /* we will not run this far */
-}
diff --git a/testsuites/sptests/spfatal19/Makefile.am b/testsuites/sptests/spfatal19/Makefile.am
deleted file mode 100644
index b6884290c6..0000000000
--- a/testsuites/sptests/spfatal19/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-
-rtems_tests_PROGRAMS = spfatal19
-spfatal19_SOURCES = ../spfatal_support/init.c \
- ../spfatal_support/consume_sems.c \
- ../spfatal_support/system.h testcase.h
-
-dist_rtems_tests_DATA = spfatal19.scn
-dist_rtems_tests_DATA += spfatal19.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
-AM_CPPFLAGS += -DSEMAPHORES_REMAINING=1
-
-LINK_OBJS = $(spfatal19_OBJECTS)
-LINK_LIBS = $(spfatal19_LDLIBS)
-
-spfatal19$(EXEEXT): $(spfatal19_OBJECTS) $(spfatal19_DEPENDENCIES)
- @rm -f spfatal19$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal19/spfatal19.doc b/testsuites/sptests/spfatal19/spfatal19.doc
deleted file mode 100644
index a0d56703e3..0000000000
--- a/testsuites/sptests/spfatal19/spfatal19.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-# COPYRIGHT (c) 1989-2010.
-# 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: spfatal19
-
-directives:
-
- rtems_termios_open
-
-concepts:
-
-+ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal19/spfatal19.scn b/testsuites/sptests/spfatal19/spfatal19.scn
deleted file mode 100644
index 6dd2901608..0000000000
--- a/testsuites/sptests/spfatal19/spfatal19.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL 19 ***
-Fatal error (termios sem create #4) hit
-*** END OF TEST FATAL 19 ***
diff --git a/testsuites/sptests/spfatal19/testcase.h b/testsuites/sptests/spfatal19/testcase.h
deleted file mode 100644
index 7b94ca4c9f..0000000000
--- a/testsuites/sptests/spfatal19/testcase.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2010.
- * 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.
- */
-
-/* generate fatal errors in termios.c
- * rtems_semaphore_create( rtems_build_name ('T', 'R', 'i', c),...);
- */
-
-#define FATAL_ERROR_TEST_NAME "19"
-#define FATAL_ERROR_DESCRIPTION "termios sem create #4"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
-
-#define FATAL_USE_TERMIOS_CONSOLE
-
-#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
- CONSUME_SEMAPHORE_DRIVERS
-
-void force_error()
-{
- /* we will not run this far */
-}
diff --git a/testsuites/sptests/spfatal20/Makefile.am b/testsuites/sptests/spfatal20/Makefile.am
deleted file mode 100644
index cf990b295d..0000000000
--- a/testsuites/sptests/spfatal20/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-
-rtems_tests_PROGRAMS = spfatal20
-spfatal20_SOURCES = ../spfatal_support/init.c \
- ../spfatal_support/consume_sems.c \
- ../spfatal_support/system.h testcase.h
-
-dist_rtems_tests_DATA = spfatal20.scn
-dist_rtems_tests_DATA += spfatal20.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
-AM_CPPFLAGS += -DSEMAPHORES_REMAINING=0
-
-LINK_OBJS = $(spfatal20_OBJECTS)
-LINK_LIBS = $(spfatal20_LDLIBS)
-
-spfatal20$(EXEEXT): $(spfatal20_OBJECTS) $(spfatal20_DEPENDENCIES)
- @rm -f spfatal20$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal20/spfatal20.doc b/testsuites/sptests/spfatal20/spfatal20.doc
deleted file mode 100644
index 245eeea617..0000000000
--- a/testsuites/sptests/spfatal20/spfatal20.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-# COPYRIGHT (c) 1989-2010.
-# 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: spfatal20
-
-directives:
-
- rtems_termios_initialize
-
-concepts:
-
-+ fatal error for unable to create a semaphore
diff --git a/testsuites/sptests/spfatal20/spfatal20.scn b/testsuites/sptests/spfatal20/spfatal20.scn
deleted file mode 100644
index fa8c3009d2..0000000000
--- a/testsuites/sptests/spfatal20/spfatal20.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL 20 ***
-Fatal error (rtems_termios_initialize cannot create semaphore) hit
-*** END OF TEST FATAL 20 ***
diff --git a/testsuites/sptests/spfatal20/testcase.h b/testsuites/sptests/spfatal20/testcase.h
deleted file mode 100644
index 715854c461..0000000000
--- a/testsuites/sptests/spfatal20/testcase.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2010.
- * 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.
- */
-
-#define FATAL_ERROR_TEST_NAME "20"
-#define FATAL_ERROR_DESCRIPTION \
- "rtems_termios_initialize cannot create semaphore"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
-
-#define FATAL_USE_TERMIOS_CONSOLE
-
-#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
- CONSUME_SEMAPHORE_DRIVERS
-
-void force_error()
-{
- /* we will not run this far */
-}
diff --git a/testsuites/sptests/spfatal_support/system.h b/testsuites/sptests/spfatal_support/system.h
index 8fe68ad716..1dc0d8b19b 100644
--- a/testsuites/sptests/spfatal_support/system.h
+++ b/testsuites/sptests/spfatal_support/system.h
@@ -71,11 +71,7 @@ extern rtems_extensions_table initial_extensions;
RTEMS_TEST_INITIAL_EXTENSION
/* extra parameters may be in testcase.h */
-#ifdef FATAL_USE_TERMIOS_CONSOLE
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#else
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
-#endif
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
/* always need an Init task, some cases need more tasks */