summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-12 00:00:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-12 00:00:04 +0000
commita3a9a2d0ef051a671ca1cee5f18a871c3117dc5d (patch)
tree17d1e9e3d73840dace1cc2d0a80f8b1913375967 /testsuites
parent2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-a3a9a2d0ef051a671ca1cee5f18a871c3117dc5d.tar.bz2
2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxcleanup/system.h: Fix typo. * Makefile.am, configure.ac: Add new test for exercising pushing and popping a clean up handler without actually executing it. * psxcleanup01/.cvsignore, psxcleanup01/Makefile.am, psxcleanup01/init.c, psxcleanup01/psxcleanup01.doc, psxcleanup01/psxcleanup01.scn: New files.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/ChangeLog9
-rw-r--r--testsuites/psxtests/Makefile.am3
-rw-r--r--testsuites/psxtests/configure.ac1
-rw-r--r--testsuites/psxtests/psxcleanup/system.h2
-rw-r--r--testsuites/psxtests/psxcleanup01/.cvsignore2
-rw-r--r--testsuites/psxtests/psxcleanup01/Makefile.am28
-rw-r--r--testsuites/psxtests/psxcleanup01/init.c50
-rw-r--r--testsuites/psxtests/psxcleanup01/psxcleanup01.doc23
-rw-r--r--testsuites/psxtests/psxcleanup01/psxcleanup01.scn4
9 files changed, 120 insertions, 2 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog
index 1ca020ab1e..7a5052dde9 100644
--- a/testsuites/psxtests/ChangeLog
+++ b/testsuites/psxtests/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * psxcleanup/system.h: Fix typo.
+ * Makefile.am, configure.ac: Add new test for exercising pushing
+ and popping a clean up handler without actually executing it.
+ * psxcleanup01/.cvsignore, psxcleanup01/Makefile.am,
+ psxcleanup01/init.c, psxcleanup01/psxcleanup01.doc,
+ psxcleanup01/psxcleanup01.scn: New files.
+
2009-10-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac: Add new test to ensure that canceling an
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index bd3bccd28a..518c3c237b 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -9,7 +9,8 @@ if HAS_POSIX
SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
psx10 psx11 psx12 psx13 psx14 psxalarm01 \
psxautoinit01 psxautoinit02 psxbarrier01 \
- psxcancel psxcancel01 psxcleanup psxcond01 psxenosys psxkey01 psxkey02 \
+ psxcancel psxcancel01 psxcleanup psxcleanup01 \
+ psxcond01 psxenosys psxkey01 psxkey02 \
psxkey03 psxitimer psxmsgq01 psxmsgq02 psxmsgq03 psxmsgq04 \
psxmutexattr01 psxobj01 psxrwlock01 psxsem01 psxsignal01 psxsignal02 \
psxsignal03 psxsignal04 psxsignal05 psxspin01 psxspin02 psxsysconf \
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 0e810d3bec..951a0324b0 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -51,6 +51,7 @@ psxcancel/Makefile
psxcancel01/Makefile
psxchroot01/Makefile
psxcleanup/Makefile
+psxcleanup01/Makefile
psxclock/Makefile
psxcond01/Makefile
psxenosys/Makefile
diff --git a/testsuites/psxtests/psxcleanup/system.h b/testsuites/psxtests/psxcleanup/system.h
index fc7a05d1e6..5baf542c60 100644
--- a/testsuites/psxtests/psxcleanup/system.h
+++ b/testsuites/psxtests/psxcleanup/system.h
@@ -7,7 +7,7 @@
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
- * $Id}
+ * $Id$
*/
/* functions */
diff --git a/testsuites/psxtests/psxcleanup01/.cvsignore b/testsuites/psxtests/psxcleanup01/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/psxtests/psxcleanup01/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/psxtests/psxcleanup01/Makefile.am b/testsuites/psxtests/psxcleanup01/Makefile.am
new file mode 100644
index 0000000000..b62793cc64
--- /dev/null
+++ b/testsuites/psxtests/psxcleanup01/Makefile.am
@@ -0,0 +1,28 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxcleanup01
+psxcleanup01_SOURCES = init.c ../include/pmacros.h
+
+dist_rtems_tests_DATA = psxcleanup01.scn
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+psxcleanup01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxcleanup01_OBJECTS) $(psxcleanup01_LDADD)
+LINK_LIBS = $(psxcleanup01_LDLIBS)
+
+psxcleanup01$(EXEEXT): $(psxcleanup01_OBJECTS) $(psxcleanup01_DEPENDENCIES)
+ @rm -f psxcleanup01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/psxtests/psxcleanup01/init.c b/testsuites/psxtests/psxcleanup01/init.c
new file mode 100644
index 0000000000..4225c32d82
--- /dev/null
+++ b/testsuites/psxtests/psxcleanup01/init.c
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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 <rtems.h>
+#include "pmacros.h"
+#include <pthread.h> /* thread facilities */
+
+void cleaner(void *arg)
+{
+ puts( "clean was not supposed to run" );
+ rtems_test_exit(0);
+}
+
+void *POSIX_Init(
+ void *argument
+)
+{
+ puts( "\n\n*** POSIX CLEANUP TEST 01 ***" );
+
+ puts( "Init - pthread_cleanup_push - a routine we will not execute" );
+ pthread_cleanup_push(cleaner, NULL);
+
+ puts( "Init - pthread_cleanup_pop - do not execute" );
+ pthread_cleanup_pop(0);
+
+ puts( "*** END OF POSIX CLEANUP TEST 01 ***\n" );
+ rtems_test_exit(0);
+}
+
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
diff --git a/testsuites/psxtests/psxcleanup01/psxcleanup01.doc b/testsuites/psxtests/psxcleanup01/psxcleanup01.doc
new file mode 100644
index 0000000000..26f8b9fb06
--- /dev/null
+++ b/testsuites/psxtests/psxcleanup01/psxcleanup01.doc
@@ -0,0 +1,23 @@
+#
+# $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: psxcleanup01
+
+directives:
+
+ pthread_cleanup_push
+ pthread_cleanup_pop
+
+concepts:
+
++ Ensure that popping a routine without executing works as expected.
diff --git a/testsuites/psxtests/psxcleanup01/psxcleanup01.scn b/testsuites/psxtests/psxcleanup01/psxcleanup01.scn
new file mode 100644
index 0000000000..4eaed6c77a
--- /dev/null
+++ b/testsuites/psxtests/psxcleanup01/psxcleanup01.scn
@@ -0,0 +1,4 @@
+*** POSIX CLEANUP TEST 01 ***
+Init - pthread_cleanup_push - a routine we will not execute
+Init - pthread_cleanup_pop - do not execute
+*** END OF POSIX CLEANUP TEST 01 ***