forked from Imagelibrary/rtems
2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, spprintk/init.c, spprintk/spprintk.scn: Enhance spprintk. Add two new fatal error tests to cover __assert_func. * spfatal11/.cvsignore, spfatal11/Makefile.am, spfatal11/init.c, spfatal11/spfatal11.doc, spfatal11/spfatal11.scn: New files.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac, spprintk/init.c, spprintk/spprintk.scn:
|
||||
Enhance spprintk. Add two new fatal error tests to cover
|
||||
__assert_func.
|
||||
* spfatal11/.cvsignore, spfatal11/Makefile.am, spfatal11/init.c,
|
||||
spfatal11/spfatal11.doc, spfatal11/spfatal11.scn: New files.
|
||||
|
||||
2009-06-18 Chris Johns <chrisj@rtems.org>
|
||||
|
||||
* sp35/priinv.c, sp35/priinv.c: Declare unions volatile to
|
||||
|
||||
@@ -10,7 +10,7 @@ SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
|
||||
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \
|
||||
sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 sp54 spsize spwatchdog \
|
||||
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
||||
spfatal08 spfatal09 spobjgetnext \
|
||||
spfatal08 spfatal09 spfatal10 spfatal11 spobjgetnext \
|
||||
spprintk spwkspace
|
||||
|
||||
DIST_SUBDIRS = $(SUBDIRS) spfatal spfatal_support
|
||||
|
||||
@@ -91,6 +91,8 @@ spfatal06/Makefile
|
||||
spfatal07/Makefile
|
||||
spfatal08/Makefile
|
||||
spfatal09/Makefile
|
||||
spfatal10/Makefile
|
||||
spfatal11/Makefile
|
||||
spobjgetnext/Makefile
|
||||
spprintk/Makefile
|
||||
spwkspace/Makefile
|
||||
|
||||
2
testsuites/sptests/spfatal11/.cvsignore
Normal file
2
testsuites/sptests/spfatal11/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
29
testsuites/sptests/spfatal11/Makefile.am
Normal file
29
testsuites/sptests/spfatal11/Makefile.am
Normal file
@@ -0,0 +1,29 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = spfatal11
|
||||
spfatal11_SOURCES = init.c
|
||||
|
||||
dist_rtems_tests_DATA = spfatal11.scn
|
||||
dist_rtems_tests_DATA += spfatal11.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
spfatal11_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
AM_CPPFLAGS += -DUSE_TIMER_SERVER
|
||||
|
||||
LINK_OBJS = $(spfatal11_OBJECTS) $(spfatal11_LDADD)
|
||||
LINK_LIBS = $(spfatal11_LDLIBS)
|
||||
|
||||
spfatal11$(EXEEXT): $(spfatal11_OBJECTS) $(spfatal11_DEPENDENCIES)
|
||||
@rm -f spfatal11$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
39
testsuites/sptests/spfatal11/init.c
Normal file
39
testsuites/sptests/spfatal11/init.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/* Test __assert_func with NULL function name
|
||||
*
|
||||
* 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 <tmacros.h>
|
||||
#undef NDEBUG
|
||||
#include <assert.h>
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
{
|
||||
puts( "\n\n*** TEST FATAL 11 ***" );
|
||||
|
||||
puts( "asserting with non-NULL strings...\n" );
|
||||
__assert_func( __FILE__, __LINE__, NULL, "forced" );
|
||||
|
||||
}
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
22
testsuites/sptests/spfatal11/spfatal11.doc
Normal file
22
testsuites/sptests/spfatal11/spfatal11.doc
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# $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: fatal 11
|
||||
|
||||
directives:
|
||||
__assert_func
|
||||
|
||||
concepts:
|
||||
|
||||
a. Verify that the __assert_func method works as expected with NULL
|
||||
function name.
|
||||
5
testsuites/sptests/spfatal11/spfatal11.scn
Normal file
5
testsuites/sptests/spfatal11/spfatal11.scn
Normal file
@@ -0,0 +1,5 @@
|
||||
*** TEST FATAL 11 ***
|
||||
asserting with non-NULL strings...
|
||||
|
||||
assertion "forced" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal11/init.c", line 24
|
||||
program stopped with signal 2.
|
||||
@@ -23,6 +23,8 @@ rtems_task Init(
|
||||
|
||||
printk( "\n\n*** TEST PRINTK ***\n" );
|
||||
|
||||
putk( "This is a test of putk\n" );
|
||||
|
||||
printk( "bad format -- %%q in parentheses (%q)\n" );
|
||||
|
||||
printk( "bad format -- %%lq in parentheses (%lq)\n", 0x1234 );
|
||||
@@ -56,7 +58,7 @@ rtems_task Init(
|
||||
printk( "%%c of X -- (%c)\n", 'X' );
|
||||
|
||||
|
||||
printk( "*** END OF TEST PRINTK ***" );
|
||||
printk( "*** END OF TEST PRINTK ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
sparc-rtems4.10-run is /opt/rtems-4.10/bin/sparc-rtems4.10-run
|
||||
|
||||
|
||||
*** TEST PRINTK ***
|
||||
This is a test of putk
|
||||
|
||||
bad format -- %q in parentheses (q)
|
||||
bad format -- %lq in parentheses (q)
|
||||
%O octal upper case 16 -- 20
|
||||
%o octal lower case of 16 -- 20
|
||||
%I of 16 -- 16
|
||||
%i of 16 -- 16
|
||||
%D of 16 -- 16
|
||||
%d of 16 -- 16
|
||||
%-3d of 16 -- 16
|
||||
%U of 16 -- 16
|
||||
%u of 16 -- 16
|
||||
%X of 16 -- 10
|
||||
%x of 16 -- 10
|
||||
%p of 0x1234 -- 1234
|
||||
%d of -16 -- -16
|
||||
%d of -16 -- -16
|
||||
%u of -16 -- 4294967280
|
||||
%s of Mary Had a Little Lamb -- (Mary Had a Little Lamb)
|
||||
%s of NULL -- ()
|
||||
%12s of joel -- ( joel)
|
||||
%4s of joel -- (joel)
|
||||
%-12s of joel -- (joel )
|
||||
%-4s of joel -- (joel)
|
||||
%c of X -- (X)
|
||||
*** END OF TEST PRINTK ***
|
||||
Reference in New Issue
Block a user