mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
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.
This commit is contained in:
@@ -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>
|
2009-10-11 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* Makefile.am, configure.ac: Add new test to ensure that canceling an
|
* Makefile.am, configure.ac: Add new test to ensure that canceling an
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ if HAS_POSIX
|
|||||||
SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
|
SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
|
||||||
psx10 psx11 psx12 psx13 psx14 psxalarm01 \
|
psx10 psx11 psx12 psx13 psx14 psxalarm01 \
|
||||||
psxautoinit01 psxautoinit02 psxbarrier01 \
|
psxautoinit01 psxautoinit02 psxbarrier01 \
|
||||||
psxcancel psxcancel01 psxcleanup psxcond01 psxenosys psxkey01 psxkey02 \
|
psxcancel psxcancel01 psxcleanup psxcleanup01 \
|
||||||
|
psxcond01 psxenosys psxkey01 psxkey02 \
|
||||||
psxkey03 psxitimer psxmsgq01 psxmsgq02 psxmsgq03 psxmsgq04 \
|
psxkey03 psxitimer psxmsgq01 psxmsgq02 psxmsgq03 psxmsgq04 \
|
||||||
psxmutexattr01 psxobj01 psxrwlock01 psxsem01 psxsignal01 psxsignal02 \
|
psxmutexattr01 psxobj01 psxrwlock01 psxsem01 psxsignal01 psxsignal02 \
|
||||||
psxsignal03 psxsignal04 psxsignal05 psxspin01 psxspin02 psxsysconf \
|
psxsignal03 psxsignal04 psxsignal05 psxspin01 psxspin02 psxsysconf \
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ psxcancel/Makefile
|
|||||||
psxcancel01/Makefile
|
psxcancel01/Makefile
|
||||||
psxchroot01/Makefile
|
psxchroot01/Makefile
|
||||||
psxcleanup/Makefile
|
psxcleanup/Makefile
|
||||||
|
psxcleanup01/Makefile
|
||||||
psxclock/Makefile
|
psxclock/Makefile
|
||||||
psxcond01/Makefile
|
psxcond01/Makefile
|
||||||
psxenosys/Makefile
|
psxenosys/Makefile
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* found in the file LICENSE in this distribution or at
|
* found in the file LICENSE in this distribution or at
|
||||||
* http://www.rtems.com/license/LICENSE.
|
* http://www.rtems.com/license/LICENSE.
|
||||||
*
|
*
|
||||||
* $Id}
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|||||||
2
testsuites/psxtests/psxcleanup01/.cvsignore
Normal file
2
testsuites/psxtests/psxcleanup01/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
28
testsuites/psxtests/psxcleanup01/Makefile.am
Normal file
28
testsuites/psxtests/psxcleanup01/Makefile.am
Normal file
@@ -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
|
||||||
50
testsuites/psxtests/psxcleanup01/init.c
Normal file
50
testsuites/psxtests/psxcleanup01/init.c
Normal file
@@ -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>
|
||||||
23
testsuites/psxtests/psxcleanup01/psxcleanup01.doc
Normal file
23
testsuites/psxtests/psxcleanup01/psxcleanup01.doc
Normal file
@@ -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.
|
||||||
4
testsuites/psxtests/psxcleanup01/psxcleanup01.scn
Normal file
4
testsuites/psxtests/psxcleanup01/psxcleanup01.scn
Normal file
@@ -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 ***
|
||||||
Reference in New Issue
Block a user