sptests: Refactor sp09 into sppartition_err01 and sp09.

This commit is contained in:
Mandar Juvekar
2014-01-02 13:22:36 -06:00
committed by Jennifer Averett
parent 56ac38ec85
commit 255178ec35
18 changed files with 781 additions and 6 deletions

View File

@@ -86,6 +86,10 @@ $(PROJECT_INCLUDE)/bsp/start.h: ../shared/include/start.h $(PROJECT_INCLUDE)/bsp
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/start.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/start.h
$(PROJECT_INCLUDE)/bsp/arm-a9mpcore-clock.h: ../shared/include/arm-a9mpcore-clock.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/arm-a9mpcore-clock.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/arm-a9mpcore-clock.h
$(PROJECT_INCLUDE)/bsp/arm-a9mpcore-irq.h: ../shared/include/arm-a9mpcore-irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/arm-a9mpcore-irq.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/arm-a9mpcore-irq.h

View File

@@ -29,7 +29,7 @@ SUBDIRS = \
sppagesize spsem01 spsem02 spsimplesched01 spsimplesched02 \
spsimplesched03 spnsext01 spedfsched01 spedfsched02 spedfsched03 \
spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01 \
spregion_err01
spregion_err01 sppartition_err01
SUBDIRS += spintrcritical20
SUBDIRS += spintrcritical19
SUBDIRS += spcontext01

View File

@@ -206,5 +206,6 @@ sptimer_err01/Makefile
sptimer_err02/Makefile
spcpuset01/Makefile
spregion_err01/Makefile
sppartition_err01/Makefile
])
AC_OUTPUT

View File

@@ -2,7 +2,7 @@
rtems_tests_PROGRAMS = sp09
sp09_SOURCES = init.c delay.c isr.c screen01.c screen02.c screen03.c screen04.c \
screen05.c screen06.c screen07.c screen08.c screen09.c screen10.c \
screen11.c task1.c task2.c task3.c task4.c \
task1.c task2.c task3.c task4.c \
system.h
dist_rtems_tests_DATA = sp09.scn

View File

@@ -68,7 +68,7 @@ void Screen9( void );
void Screen10( void );
void Screen11( void );
//void Screen11( void );
//void Screen12( void );

View File

@@ -53,9 +53,6 @@ rtems_task Task_1(
rtems_test_pause_and_screen_number( 10 );
Screen10();
rtems_test_pause_and_screen_number( 11 );
Screen11();
puts( "*** END OF TEST 9 ***" );
rtems_test_exit( 0 );

View File

@@ -0,0 +1,24 @@
rtems_tests_PROGRAMS = sp09
sp09_SOURCES = init.c delay.c \
screen11.c task1.c task2.c task3.c task4.c \
system.h
dist_rtems_tests_DATA = sp09.scn
dist_rtems_tests_DATA += sp09.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
LINK_OBJS = $(sp09_OBJECTS)
LINK_LIBS = $(sp09_LDLIBS)
sp09$(EXEEXT): $(sp09_OBJECTS) $(sp09_DEPENDENCIES)
@rm -f sp09$(EXEEXT)
$(make-exe)
include $(top_srcdir)/../automake/local.am

View File

@@ -0,0 +1,29 @@
/* Delayed_routine
*
* This routine is used as the timer routine for Timer Manager tests.
*
* Input parameters:
* ignored - this parameter is ignored
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "system.h"
rtems_timer_service_routine Delayed_routine(
rtems_id ignored_id,
void *ignored_address
)
{
}

View File

@@ -0,0 +1,106 @@
/*
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define CONFIGURE_INIT
#include "system.h"
rtems_task Init(
rtems_task_argument argument
)
{
rtems_status_code status;
puts( "\n\n*** TEST 9 ***" );
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
Task_name[ 6 ] = rtems_build_name( 'T', 'A', '6', ' ' );
Task_name[ 7 ] = rtems_build_name( 'T', 'A', '7', ' ' );
Task_name[ 8 ] = rtems_build_name( 'T', 'A', '8', ' ' );
Task_name[ 9 ] = rtems_build_name( 'T', 'A', '9', ' ' );
Task_name[ 10 ] = rtems_build_name( 'T', 'A', 'A', ' ' );
Semaphore_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' );
Semaphore_name[ 2 ] = rtems_build_name( 'S', 'M', '2', ' ' );
Semaphore_name[ 3 ] = rtems_build_name( 'S', 'M', '3', ' ' );
Queue_name[ 1 ] = rtems_build_name( 'M', 'Q', '1', ' ' );
Queue_name[ 2 ] = rtems_build_name( 'M', 'Q', '2', ' ' );
Partition_name[ 1 ] = rtems_build_name( 'P', 'T', '1', ' ' );
Port_name[ 1 ] = rtems_build_name( 'D', 'P', '1', ' ' );
Period_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
/* priority of 0 error */
status = rtems_task_create(
Task_name[1],
0,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ]
);
fatal_directive_status(
status,
RTEMS_INVALID_PRIORITY,
"rtems_task_create with illegal priority"
);
puts( "INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY" );
/* priority > 255 error */
status = rtems_task_create(
Task_name[1],
257,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ]
);
fatal_directive_status(
status,
RTEMS_INVALID_PRIORITY,
"rtems_task_create with illegal priority"
);
puts(
"INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY"
);
status = rtems_task_create(
Task_name[ 1 ],
4,
RTEMS_MINIMUM_STACK_SIZE * 3,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ]
);
directive_failed( status, "rtems_task_create of TA1" );
status = rtems_task_restart( Task_id[ 1 ], 0 );
fatal_directive_status(
status,
RTEMS_INCORRECT_STATE,
"rtems_task_restart of DORMANT task"
);
puts( "INIT - rtems_task_restart - RTEMS_INCORRECT_STATE" );
status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
directive_failed( status, "rtems_task_start of TA1" );
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
}

View File

@@ -0,0 +1,28 @@
/* Service_routine
*
* This routine is used as the timer routine for Interrupt Manager tests.
*
* Input parameters:
* ignored - this parameter is ignored
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "system.h"
rtems_isr Service_routine(
rtems_vector_number ignored
)
{
}

View File

@@ -0,0 +1,30 @@
# COPYRIGHT (c) 1989-1999.
# 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: test9
directives:
tm_tick, t_resume, t_setpri, t_setreg, t_start, t_suspend, tm_wkafter,
tm_wkwhen, ev_receive, ev_send, sm_create, sm_delete, sm_ident,
sm_p, sm_v, q_broadcast, q_create, q_delete, q_ident, q_receive,
q_send, q_urgent, as_catch, as_send, as_return, pt_create, pt_delete,
pt_getbug, pt_ident, pt_retbuf, de_close, de_cntrl, de_init, de_open,
de_read, de_write
concepts:
a. Verifies all error codes returned by the executive in single
processor configurations.
b. Verifies error conditions in the following kernel routines or macros:
_Ck_date_time, _Expired, _Q_submit, _Get_mnodes, _Get_node,
_Free_mem, _Get_mem, _Valid_block, _Set_tcb, _Set_resource,
_In_range, _On_boundary

View File

@@ -0,0 +1,245 @@
*** TEST 9 ***
INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY
INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY
INIT - rtems_task_restart - RTEMS_INCORRECT_STATE
TA1 - rtems_task_is_suspended - RTEMS_INVALID_ID
TA1 - rtems_task_delete - RTEMS_INVALID_ID
TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER
TA1 - rtems_task_get_note - RTEMS_INVALID_ID
TA1 - rtems_task_get_note - RTEMS_INVALID_ID
TA1 - rtems_task_ident - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL
TA1 - rtems_task_ident - global RTEMS_INVALID_NAME
TA1 - rtems_task_ident - local RTEMS_INVALID_NAME
TA1 - rtems_task_ident - RTEMS_INVALID_NODE
TA1 - rtems_task_restart - RTEMS_INVALID_ID
TA1 - rtems_task_resume - RTEMS_INVALID_ID
TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE
TA1 - rtems_task_set_priority - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY
TA1 - rtems_task_set_priority - RTEMS_INVALID_ID
TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER
TA1 - rtems_task_set_note - RTEMS_INVALID_ID
TA1 - rtems_task_start - RTEMS_INVALID_ID
TA1 - rtems_task_start - RTEMS_INCORRECT_STATE
TA1 - rtems_task_suspend - RTEMS_INVALID_ID
TA1 - rtems_task_mode - RTEMS_INVALID_ADDRESS
<pause - screen 2>
TA1 - rtems_clock_get_tod - RTEMS_INVALID_ADDRESS
TA1 - rtems_clock_get_tod - RTEMS_NOT_DEFINED
TA1 - rtems_clock_get_seconds_since_epoch - RTEMS_INVALID_ADDRESS
TA1 - rtems_clock_get_seconds_since_epoch - RTEMS_NOT_DEFINED
TA1 - rtems_clock_get_uptime - RTEMS_INVALID_ADDRESS
TA1 - rtems_clock_get_uptime_timeval
TA1 - rtems_clock_get_uptime_seconds
TA1 - rtems_clock_get_uptime_nanoseconds
TA1 - rtems_clock_get_tod_timeval - RTEMS_INVALID_ADDRESS
TA1 - rtems_clock_get_tod_timeval - RTEMS_NOT_DEFINED
TA1 - rtems_clock_set_nanoseconds_extension - RTEMS_INVALID_ADDRESS
TA1 - rtems_clock_set - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_wake_when - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_wake_when - RTEMS_NOT_DEFINED
TA1 - rtems_timer_fire_when - RTEMS_NOT_DEFINED
TA1 - rtems_clock_set - 08:30:45 02/05/1987 - RTEMS_INVALID_CLOCK
TA1 - rtems_clock_set - 08:30:45 15/05/1988 - RTEMS_INVALID_CLOCK
TA1 - rtems_clock_set - 08:30:45 02/32/1988 - RTEMS_INVALID_CLOCK
TA1 - rtems_clock_set - 25:30:45 02/05/1988 - RTEMS_INVALID_CLOCK
TA1 - rtems_clock_set - 08:61:45 02/05/1988 - RTEMS_INVALID_CLOCK
TA1 - rtems_clock_set - 08:30:61 02/05/1988 - RTEMS_INVALID_CLOCK
TA1 - rtems_clock_set - 08:30:45 02/05/1988 - RTEMS_INVALID_CLOCK
TA1 - rtems_clock_set - 08:30:45 02/05/1988 - RTEMS_SUCCESSFUL
TA1 - rtems_task_wake_when - TICKINVALID - sleep about 3 seconds
TA1 - rtems_task_wake_when - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_wake_when - TICKINVALID - woke up RTEMS_SUCCESSFUL
TA1 - rtems_task_wake_when - 08:30:48 02/05/1961 - RTEMS_INVALID_CLOCK
TA1 - rtems_task_wake_when - 25:30:48 02/05/1988 - RTEMS_INVALID_CLOCK
TA1 - current time - 08:30:51 02/05/1988
TA1 - rtems_task_wake_when - 08:30:51 01/05/1988 - RTEMS_INVALID_CLOCK
<pause - screen 3>
TA1 - rtems_task_create - RTEMS_INVALID_NAME
TA1 - rtems_task_create - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED -- SKIPPED
TA1 - rtems_task_create - TA2 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_suspend - suspend TA2 - RTEMS_SUCCESSFUL
TA1 - rtems_task_suspend - suspend TA2 - RTEMS_ALREADY_SUSPENDED
TA1 - rtems_task_resume - TA2 resumed - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - TA3 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 4 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 5 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 6 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 7 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 8 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 9 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 10 created - RTEMS_SUCCESSFUL
TA1 - rtems_task_create - 11 - RTEMS_TOO_MANY
TA1 - rtems_task_create - RTEMS_MP_NOT_CONFIGURED
<pause - screen 4>
TA1 - rtems_event_receive - NULL param - RTEMS_INVALID_ADDRESS
TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( all conditions )
TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( any condition )
TA1 - rtems_event_receive - timeout in 3 seconds
TA1 - rtems_event_receive - woke up with RTEMS_TIMEOUT
TA1 - rtems_event_send - RTEMS_INVALID_ID
TA1 - rtems_task_wake_after - sleep 1 second - RTEMS_SUCCESSFUL
TA1 - rtems_clock_set - 08:30:45 02/05/1988 - RTEMS_SUCCESSFUL
TA1 - current time - Fri Feb 5 08:30:45 1988
<pause - screen 5>
TA1 - rtems_semaphore_create - RTEMS_INVALID_NAME
TA1 - rtems_semaphore_create - RTEMS_INVALID_ADDRESS
TA1 - rtems_semaphore_create - 1 - RTEMS_SUCCESSFUL
TA1 - rtems_semaphore_create - 2 - RTEMS_SUCCESSFUL
TA1 - rtems_semaphore_create - 3 - RTEMS_TOO_MANY
TA1 - rtems_semaphore_create - FIFO and inherit - RTEMS_NOT_DEFINED
TA1 - rtems_semaphore_create - FIFO and ceiling - RTEMS_NOT_DEFINED
TA1 - rtems_semaphore_create - ceiling and inherit - RTEMS_NOT_DEFINED
TA1 - rtems_semaphore_create - RTEMS_NOT_DEFINED
TA1 - rtems_semaphore_create - RTEMS_INVALID_NUMBER
TA1 - rtems_semaphore_create - RTEMS_MP_NOT_CONFIGURED
TA1 - rtems_semaphore_delete - RTEMS_INVALID_ID
TA1 - rtems_semaphore_delete - local RTEMS_INVALID_ID
TA1 - rtems_semaphore_ident - global RTEMS_INVALID_NAME
TA1 - rtems_semaphore_ident - local RTEMS_INVALID_NAME
TA1 - rtems_semaphore_release - RTEMS_INVALID_ID
TA1 - rtems_semaphore_flush - RTEMS_INVALID_ID
<pause - screen 6>
TA1 - rtems_semaphore_obtain - RTEMS_INVALID_ID
TA1 - rtems_semaphore_obtain - got sem 1 - RTEMS_SUCCESSFUL
TA1 - rtems_semaphore_obtain - RTEMS_UNSATISFIED
TA1 - rtems_semaphore_obtain - timeout in 3 seconds
TA1 - rtems_semaphore_obtain - woke up with RTEMS_TIMEOUT
TA1 - rtems_semaphore_release - RTEMS_NOT_OWNER_OF_RESOURCE
TA1 - rtems_semaphore_release - RTEMS_INVALID_ID
TA1 - rtems_task_start - start TA2 - RTEMS_SUCCESSFUL
TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
TA2 - rtems_semaphore_obtain - sem 1 - RTEMS_WAIT FOREVER
TA1 - rtems_semaphore_delete - delete sem 1 - RTEMS_SUCCESSFUL
TA1 - rtems_semaphore_obtain - binary semaphore
TA1 - rtems_semaphore_delete - delete sem 2 - RTEMS_RESOURCE_IN_USE
TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
TA2 - rtems_semaphore_obtain - woke up with RTEMS_OBJECT_WAS_DELETED
TA2 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
TA1 - rtems_task_delete TA2 - already deleted RTEMS_INVALID_ID
<pause - screen 7>
TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID
TA1 - rtems_message_queue_create - NULL Id - RTEMS_INVALID_ADDRESS
TA1 - rtems_message_queue_create - count = 0 - RTEMS_INVALID_NUMBER
TA1 - rtems_message_queue_create - size = 0 - RTEMS_INVALID_SIZE
TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME
TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED
TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED
TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED #2
TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY
TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID
TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID
TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME
TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ADDRESS
TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID
TA1 - rtems_message_queue_flush - RTEMS_INVALID_ADDRESS
TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID
TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID
TA1 - rtems_message_queue_receive - Q 1 - RTEMS_INVALID_ADDRESS NULL buffer
TA1 - rtems_message_queue_receive - Q 1 - RTEMS_INVALID_ADDRESS NULL size
TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED
TA1 - rtems_message_queue_receive - Q 1 - timeout in 3 seconds
TA1 - rtems_message_queue_receive - Q 1 - woke up with RTEMS_TIMEOUT
TA1 - rtems_message_queue_send - NULL buffer - RTEMS_INVALID_ADDRESS
TA1 - rtems_message_queue_send - RTEMS_INVALID_ID
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
TA1 - rtems_message_queue_urgent - NULL buffer - RTEMS_INVALID_ADDRESS
TA1 - rtems_message_queue_urgent - RTEMS_INVALID_ID
TA1 - rtems_message_queue_broadcast - NULL buffer - RTEMS_INVALID_ADDRESS
TA1 - rtems_message_queue_broadcast - too large - RTEMS_INVALID_SIZE
TA1 - rtems_message_queue_broadcast - NULL count - RTEMS_INVALID_ADDRESS
<pause - screen 8>
TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY
TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL
TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
TA3 - rtems_message_queue_receive - Q 1 - RTEMS_WAIT FOREVER
TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL
TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED
TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
<pause - screen 9>
TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER
TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS
TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS
TA1 - rtems_signal_send - RTEMS_INVALID_ID
TA1 - rtems_signal_send - RTEMS_INVALID_NUMBER
TA1 - rtems_signal_send - RTEMS_NOT_DEFINED
TA1 - rtems_port_create - RTEMS_INVALID_NAME
TA1 - rtems_port_create - bad range - RTEMS_INVALID_ADDRESS
TA1 - rtems_port_create - null id - RTEMS_INVALID_ADDRESS
TA1 - rtems_port_create - RTEMS_TOO_MANY
TA1 - rtems_port_delete - RTEMS_INVALID_ID
TA1 - rtems_port_ident - RTEMS_INVALID_NAME
TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ADDRESS
TA1 - rtems_port_internal_to_external - RTEMS_INVALID_ID
TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ADDRESS
<pause - screen 10>
TA1 - rtems_rate_monotonic_create - RTEMS_INVALID_ADDRESS
TA1 - rtems_rate_monotonic_create - RTEMS_INVALID_NAME
TA1 - rtems_rate_monotonic_create - RTEMS_SUCCESSFUL
TA1 - rtems_rate_monotonic_create - RTEMS_TOO_MANY
TA1 - rtems_rate_monotonic_ident - RTEMS_INVALID_NAME
TA1 - rtems_rate_monotonic_period - RTEMS_INVALID_ID
TA1 - rtems_rate_monotonic_period - local RTEMS_INVALID_ID
TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_NOT_DEFINED
TA1 - rtems_rate_monotonic_period - 100 ticks - RTEMS_SUCCESSFUL
TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_SUCCESSFUL
TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_TIMEOUT
TA1 - rtems_rate_monotonic_get_statistics - RTEMS_INVALID_ADDRESS
TA1 - rtems_rate_monotonic_get_status - RTEMS_INVALID_ADDRESS
TA1 - rtems_rate_monotonic_get_status - RTEMS_INVALID_ID
TA1 - rtems_rate_monotonic_cancel - RTEMS_INVALID_ID
TA1 - rtems_rate_monotonic_cancel - local RTEMS_INVALID_ID
TA1 - rtems_rate_monotonic_cancel - RTEMS_SUCCESSFUL
TA1 - rtems_rate_monotonic_period - 5 ticks - RTEMS_TIMEOUT
TA1 - yielding to TA4
TA4 - rtems_rate_monotonic_cancel - RTEMS_NOT_OWNER_OF_RESOURCE
TA4 - rtems_rate_monotonic_period - RTEMS_NOT_OWNER_OF_RESOURCE
TA4 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
TA1 - rtems_rate_monotonic_delete - RTEMS_INVALID_ID
TA1 - rtems_rate_monotonic_delete - local RTEMS_INVALID_ID
TA1 - rtems_rate_monotonic_delete - RTEMS_SUCCESSFUL
<pause - screen 11>
TA1 - rtems_partition_create - RTEMS_INVALID_NAME
TA1 - rtems_partition_create - length - RTEMS_INVALID_SIZE
TA1 - rtems_partition_create - buffer size - RTEMS_INVALID_SIZE
TA1 - rtems_partition_create - length < buffer size - RTEMS_INVALID_SIZE
TA1 - rtems_partition_create - buffer size < overhead - RTEMS_INVALID_SIZE
TA1 - rtems_partition_create - RTEMS_MP_NOT_CONFIGURED
TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS
TA1 - rtems_partition_create - RTEMS_INVALID_SIZE
TA1 - rtems_partition_delete - unknown RTEMS_INVALID_ID
TA1 - rtems_partition_delete - local RTEMS_INVALID_ID
TA1 - rtems_partition_get_buffer - RTEMS_INVALID_ADDRESS
TA1 - rtems_partition_get_buffer - RTEMS_INVALID_ID
TA1 - rtems_partition_ident - RTEMS_INVALID_NAME
TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ID
TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS
TA1 - rtems_partition_create - RTEMS_SUCCESSFUL
TA1 - rtems_partition_create - RTEMS_TOO_MANY
TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL
TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL
TA1 - rtems_partition_get_buffer - RTEMS_UNSATISFIED
TA1 - rtems_partition_delete - RTEMS_RESOURCE_IN_USE
TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ADDRESS - out of range
TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ADDRESS - not on boundary
*** END OF TEST 9 ***

View File

@@ -0,0 +1,123 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989-1999.
* 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.
*/
#include <tmacros.h>
/* functions */
rtems_task Init(
rtems_task_argument argument
);
rtems_timer_service_routine Delayed_routine(
rtems_id ignored_id,
void *ignored_address
);
rtems_task Task_1(
rtems_task_argument argument
);
rtems_task Task_2(
rtems_task_argument argument
);
rtems_task Task_3(
rtems_task_argument argument
);
rtems_task Task_4(
rtems_task_argument argument
);
rtems_isr Service_routine(
rtems_vector_number ignored
);
rtems_timer_service_routine Io_during_interrupt(
rtems_id ignored
);
/*void Screen1( void );
void Screen2( void );
void Screen3( void );
void Screen4( void );
void Screen5( void );
void Screen6( void );
void Screen7( void );
void Screen8( void );
void Screen9( void );
void Screen10( void );*/
void Screen11( void );
//void Screen12( void );
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 10
#define CONFIGURE_MAXIMUM_TIMERS 1
#define CONFIGURE_MAXIMUM_SEMAPHORES 2
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
#define CONFIGURE_MAXIMUM_PARTITIONS 1
#define CONFIGURE_MAXIMUM_PERIODS 1
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
#define CONFIGURE_TICKS_PER_TIMESLICE 100
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_EXTRA_TASK_STACKS (20 * RTEMS_MINIMUM_STACK_SIZE)
#include <rtems/confdefs.h>
/* global variables */
TEST_EXTERN rtems_id Task_id[ 11 ]; /* array of task ids */
TEST_EXTERN rtems_name Task_name[ 11 ]; /* array of task names */
TEST_EXTERN rtems_name Semaphore_name[ 4 ]; /* array of semaphore names */
TEST_EXTERN rtems_id Semaphore_id[ 4 ]; /* array of semaphore ids */
TEST_EXTERN rtems_name Queue_name[ 3 ]; /* array of queue names */
TEST_EXTERN rtems_id Queue_id[ 3 ]; /* array of queue ids */
TEST_EXTERN rtems_name Partition_name[ 2 ]; /* array of partition names */
TEST_EXTERN rtems_id Partition_id[ 2 ]; /* array of partition ids */
TEST_EXTERN rtems_name Port_name[ 2 ]; /* array of port names */
TEST_EXTERN rtems_id Port_id[ 2 ]; /* array of port ids */
TEST_EXTERN rtems_name Period_name[ 2 ]; /* array of period names */
TEST_EXTERN rtems_id Period_id[ 2 ]; /* array of period ids */
TEST_EXTERN rtems_id Junk_id; /* id used to return errors */
#define Internal_port_area (void *) 0x00001000
#define External_port_area (void *) 0x00002000
TEST_EXTERN uint8_t Partition_good_area[256] CPU_STRUCTURE_ALIGNMENT;
#define Partition_bad_area (void *) 0x00000005
/* end of include file */

View File

@@ -0,0 +1,34 @@
/* Task_1
*
* This task generates all possible errors for the RTEMS executive.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "system.h"
rtems_task Task_1(
rtems_task_argument argument
)
{
rtems_test_pause_and_screen_number( 11 );
Screen11();
puts( "*** END OF TEST 9 ***" );
rtems_test_exit( 0 );
}

View File

@@ -0,0 +1,49 @@
/* Task_2
*
* This routine serves as a test task. Its only purpose is to generate the
* error where a semaphore is deleted while a task is waiting for it.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "system.h"
rtems_task Task_2(
rtems_task_argument argument
)
{
rtems_status_code status;
puts( "TA2 - rtems_semaphore_obtain - sem 1 - RTEMS_WAIT FOREVER" );
status = rtems_semaphore_obtain(
Semaphore_id[ 1 ],
RTEMS_DEFAULT_OPTIONS,
RTEMS_NO_TIMEOUT
);
fatal_directive_status(
status,
RTEMS_OBJECT_WAS_DELETED,
"rtems_semaphore_obtain waiting to be deleted"
);
puts(
"TA2 - rtems_semaphore_obtain - woke up with RTEMS_OBJECT_WAS_DELETED"
);
puts( "TA2 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of TA2" );
}

View File

@@ -0,0 +1,54 @@
/* Task_3
*
* This routine serves as a test task. Its only purpose in life is to
* generate the error where a message queue is deleted while a task
* is waiting there for a message.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-2007.
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "system.h"
rtems_task Task_3(
rtems_task_argument argument
)
{
rtems_status_code status;
long buffer[ 4 ];
size_t size;
puts( "TA3 - rtems_message_queue_receive - Q 1 - RTEMS_WAIT FOREVER" );
status = rtems_message_queue_receive(
Queue_id[ 1 ],
(long (*)[4])buffer,
&size,
RTEMS_DEFAULT_OPTIONS,
RTEMS_NO_TIMEOUT
);
fatal_directive_status(
status,
RTEMS_OBJECT_WAS_DELETED,
"rtems_message_queue_receive waiting to be deleted"
);
puts(
"TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED"
);
puts( "TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of TA3" );
}

View File

@@ -0,0 +1,51 @@
/* Task_4
*
* This routine serves as a test task. Its only purpose in life is to
* generate the error where a rate monotonic period is accessed by a
* task other than its creator.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "system.h"
rtems_task Task_4(
rtems_task_argument argument
)
{
rtems_status_code status;
status = rtems_rate_monotonic_cancel( Period_id[ 1 ] );
fatal_directive_status(
status,
RTEMS_NOT_OWNER_OF_RESOURCE,
"rtems_rate_monotonic_cancel not the owner"
);
puts( "TA4 - rtems_rate_monotonic_cancel - RTEMS_NOT_OWNER_OF_RESOURCE" );
status = rtems_rate_monotonic_period( Period_id[ 1 ], 5 );
fatal_directive_status(
status,
RTEMS_NOT_OWNER_OF_RESOURCE,
"rtems_rate_monotonic_period not the owner"
);
puts( "TA4 - rtems_rate_monotonic_period - RTEMS_NOT_OWNER_OF_RESOURCE" );
puts( "TA4 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of TA4" );
}