From c83a33ccbbcbf108412a116356b6168b8b3b8b99 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 30 Jan 2009 22:20:39 +0000 Subject: 2009-01-30 Joel Sherrill * Makefile.am, configure.ac: Add sp48 which tests that configuring for unlimited objects when configured for a unified workspace works as expected. * sp48/.cvsignore, sp48/Makefile.am, sp48/init.c, sp48/sp48.doc, sp48/sp48.scn: New files. --- testsuites/sptests/ChangeLog | 8 ++++ testsuites/sptests/Makefile.am | 4 +- testsuites/sptests/configure.ac | 1 + testsuites/sptests/sp48/.cvsignore | 2 + testsuites/sptests/sp48/Makefile.am | 28 +++++++++++++ testsuites/sptests/sp48/init.c | 84 +++++++++++++++++++++++++++++++++++++ testsuites/sptests/sp48/sp48.doc | 24 +++++++++++ testsuites/sptests/sp48/sp48.scn | 11 +++++ 8 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 testsuites/sptests/sp48/.cvsignore create mode 100644 testsuites/sptests/sp48/Makefile.am create mode 100644 testsuites/sptests/sp48/init.c create mode 100644 testsuites/sptests/sp48/sp48.doc create mode 100644 testsuites/sptests/sp48/sp48.scn (limited to 'testsuites') diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index d1ed6cbe7d..8adb8f4a7a 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,11 @@ +2009-01-30 Joel Sherrill + + * Makefile.am, configure.ac: Add sp48 which tests that configuring for + unlimited objects when configured for a unified workspace works as + expected. + * sp48/.cvsignore, sp48/Makefile.am, sp48/init.c, sp48/sp48.doc, + sp48/sp48.scn: New files. + 2009-01-21 Nickolay Kolchin Joel Sherrill diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index 341f71b6ae..be54ecf62b 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -8,8 +8,8 @@ ACLOCAL_AMFLAGS = -I ../aclocal SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \ sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \ sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \ - sp45 sp46 sp47 spsize spwatchdog spfatal01 spfatal02 spfatal03 spfatal04 \ - spfatal05 spfatal06 spfatal07 spfatal08 spfatal09 + sp45 sp46 sp47 sp48 spsize spwatchdog spfatal01 spfatal02 spfatal03 \ + spfatal04 spfatal05 spfatal06 spfatal07 spfatal08 spfatal09 DIST_SUBDIRS = $(SUBDIRS) spfatal spfatal_support EXTRA_DIST = spfatal_support/init.c spfatal_support/system.h diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index 058d0cd7b2..e518a73553 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -72,6 +72,7 @@ sp44/Makefile sp45/Makefile sp46/Makefile sp47/Makefile +sp48/Makefile spwatchdog/Makefile spsize/Makefile spfatal/Makefile diff --git a/testsuites/sptests/sp48/.cvsignore b/testsuites/sptests/sp48/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/sp48/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/sp48/Makefile.am b/testsuites/sptests/sp48/Makefile.am new file mode 100644 index 0000000000..5c705d4d16 --- /dev/null +++ b/testsuites/sptests/sp48/Makefile.am @@ -0,0 +1,28 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = sp48.exe +sp48_exe_SOURCES = init.c + +dist_rtems_tests_DATA = sp48.scn +dist_rtems_tests_DATA += sp48.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +sp48_exe_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(sp48_exe_OBJECTS) $(sp48_exe_LDADD) +LINK_LIBS = $(sp48_exe_LDLIBS) + +sp48.exe$(EXEEXT): $(sp48_exe_OBJECTS) $(sp48_exe_DEPENDENCIES) + @rm -f sp48.exe$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp48/init.c b/testsuites/sptests/sp48/init.c new file mode 100644 index 0000000000..33c8315c1c --- /dev/null +++ b/testsuites/sptests/sp48/init.c @@ -0,0 +1,84 @@ +/* + * Verify creation of semaphores with unlimited attribute works. + * + * $Id$ + */ + +#include +#include + +#define MAX 5000 +rtems_id Semaphores[MAX]; + +rtems_task Init(rtems_task_argument ignored) +{ + rtems_status_code sc; + int i; + int created; + + puts( "\n\n*** TEST 48 ***" ); + + printf( "Largest C program heap block available: %d\n", malloc_free_space() ); + for (i=0 ; i diff --git a/testsuites/sptests/sp48/sp48.doc b/testsuites/sptests/sp48/sp48.doc new file mode 100644 index 0000000000..5e71aee8d9 --- /dev/null +++ b/testsuites/sptests/sp48/sp48.doc @@ -0,0 +1,24 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2008. +# 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: sp48 + +directives: + + rtems_semaphore_create + rtems_semaphore_delete + +concepts: + ++ Ensure that unlimited object configuration works properly when + configured for unified C program heap and Executive Workspace. diff --git a/testsuites/sptests/sp48/sp48.scn b/testsuites/sptests/sp48/sp48.scn new file mode 100644 index 0000000000..98049cfe16 --- /dev/null +++ b/testsuites/sptests/sp48/sp48.scn @@ -0,0 +1,11 @@ +*** TEST 48 *** +Largest C program heap block available: 4006096 +Created all semaphores allowed in this test +5000 semaphores created +Largest C program heap block available: 2376296 +5000 semaphores successfully deleted +Largest C program heap block available: 2376296 +*** END OF TEST 48 *** + +NOTE: Heap block size and maximum objects created vary based upon target. + The maximum semaphores that will be created is 5000. -- cgit v1.2.3