From 713b2eac2fdb0a40056ddb8eb00250541df0a3b2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 10 Nov 1999 22:15:42 +0000 Subject: General cleanup. Test documentation improved. The message buffer test prints a message instead of actually testing since the message buffer implementation is not in yet. --- c/src/tests/itrontests/Makefile.am | 3 +- c/src/tests/itrontests/itronhello/system.h | 1 + c/src/tests/itrontests/itronmbf01/init.c | 8 ++++-- c/src/tests/itrontests/itronmbf01/system.h | 1 + c/src/tests/itrontests/itrontask01/itrontask01.doc | 6 ++-- c/src/tests/itrontests/itrontask01/system.h | 1 + c/src/tests/itrontests/itrontask02/itrontask02.doc | 16 ++++++++++- c/src/tests/itrontests/itrontask02/system.h | 1 + c/src/tests/itrontests/itrontask03/itrontask03.doc | 27 +++++++++++++----- c/src/tests/itrontests/itrontask03/itrontask03.scn | 2 +- c/src/tests/itrontests/itrontask03/system.h | 1 + c/src/tests/itrontests/itrontask03/task1.c | 2 +- c/src/tests/itrontests/itrontask04/itrontask04.doc | 32 +++++++++++++++++++--- c/src/tests/itrontests/itrontask04/system.h | 1 + c/src/tests/itrontests/itrontime01/system.h | 1 + 15 files changed, 81 insertions(+), 22 deletions(-) (limited to 'c') diff --git a/c/src/tests/itrontests/Makefile.am b/c/src/tests/itrontests/Makefile.am index 9779acc5b8..60c9b69ffe 100644 --- a/c/src/tests/itrontests/Makefile.am +++ b/c/src/tests/itrontests/Makefile.am @@ -13,10 +13,9 @@ $(PREINSTALLDIRS): all-local: $(PREINSTALLDIRS) -ITRON_DIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \ +SUBDIRS = . itronhello itrontask01 itrontask02 itrontask03 itrontask04 \ itronmbf01 itronsem01 itrontime01 -SUBDIRS = $(ITRON_DIRS) include $(top_srcdir)/../../../../automake/subdirs.am include $(top_srcdir)/../../../../automake/local.am diff --git a/c/src/tests/itrontests/itronhello/system.h b/c/src/tests/itrontests/itronhello/system.h index d7a30d195b..425c8f7e7a 100644 --- a/c/src/tests/itrontests/itronhello/system.h +++ b/c/src/tests/itrontests/itronhello/system.h @@ -15,6 +15,7 @@ */ #include +#include /* functions */ diff --git a/c/src/tests/itrontests/itronmbf01/init.c b/c/src/tests/itrontests/itronmbf01/init.c index 39788c49f8..20219e7163 100644 --- a/c/src/tests/itrontests/itronmbf01/init.c +++ b/c/src/tests/itrontests/itronmbf01/init.c @@ -47,8 +47,9 @@ void TestPrcv(); void ITRON_Init( void ) { - printf( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***\n" ); + puts( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***" ); +#if 0 TestCre(); TestDel(); TestPsnd(); @@ -57,8 +58,11 @@ void ITRON_Init( void ) TestRef(); TestPrcv(); TestTrcv(); +#else + puts("Enable the code in this test when messages buffers are implemented"); +#endif - printf("\n\n*** ITRONMBF01 --- ITRON MESSAGE BUFFER TEST ***\n"); + printf("*** ITRONMBF01 --- ITRON MESSAGE BUFFER TEST ***"); exit(0); } diff --git a/c/src/tests/itrontests/itronmbf01/system.h b/c/src/tests/itrontests/itronmbf01/system.h index b433415b2b..1566711d1e 100644 --- a/c/src/tests/itrontests/itronmbf01/system.h +++ b/c/src/tests/itrontests/itronmbf01/system.h @@ -15,6 +15,7 @@ */ #include +#include /* functions */ diff --git a/c/src/tests/itrontests/itrontask01/itrontask01.doc b/c/src/tests/itrontests/itrontask01/itrontask01.doc index 2ae309239f..91c00f86a8 100644 --- a/c/src/tests/itrontests/itrontask01/itrontask01.doc +++ b/c/src/tests/itrontests/itrontask01/itrontask01.doc @@ -13,12 +13,10 @@ This file describes the directives and concepts tested by this test set. This test is based upon the test in sp01. -test set name: test1 +test set name: itrontask01 directives: - cre_tsk, sta_tsk, exd_tsk, get_tid - ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident, - tm_set, tm_get, tm_wkafter + cre_tsk, exd_tsk, get_tid, sta_tsk concepts: XXX verify diff --git a/c/src/tests/itrontests/itrontask01/system.h b/c/src/tests/itrontests/itrontask01/system.h index 7523bb5890..dba14c7b00 100644 --- a/c/src/tests/itrontests/itrontask01/system.h +++ b/c/src/tests/itrontests/itrontask01/system.h @@ -15,6 +15,7 @@ */ #include +#include /* functions */ diff --git a/c/src/tests/itrontests/itrontask02/itrontask02.doc b/c/src/tests/itrontests/itrontask02/itrontask02.doc index 92d941ecaf..17197458b6 100644 --- a/c/src/tests/itrontests/itrontask02/itrontask02.doc +++ b/c/src/tests/itrontests/itrontask02/itrontask02.doc @@ -14,8 +14,22 @@ This file describes the directives and concepts tested by this test set. This test forces and verifies error conditions for the task and task synchronization managers.. -test set name: +test set name: itrontask02 directives: + chg_pri cre_tsk del_tsk dis_dsp ena_dsp exd_tsk ext_tsk + frsm_tsk get_tid ref_tsk rel_wai rot_rdq rsm_tsk slp_tsk + sta_tsk sus_tsk ter_tsk tslp_tsk wup_tsk concepts: + + a. Verification of error codes from all task and task synchronization + commands. + +notes: + Unimplementted functions are stubbed out and should be added when + the functions are finished. + +output: + Name of command and expected error code. + Test asserts when an unexpected error code or an error does not occur. diff --git a/c/src/tests/itrontests/itrontask02/system.h b/c/src/tests/itrontests/itrontask02/system.h index 5b73c1a36c..daad15c340 100644 --- a/c/src/tests/itrontests/itrontask02/system.h +++ b/c/src/tests/itrontests/itrontask02/system.h @@ -15,6 +15,7 @@ */ #include +#include /* functions */ diff --git a/c/src/tests/itrontests/itrontask03/itrontask03.doc b/c/src/tests/itrontests/itrontask03/itrontask03.doc index 12d12f0940..d5632c19ca 100644 --- a/c/src/tests/itrontests/itrontask03/itrontask03.doc +++ b/c/src/tests/itrontests/itrontask03/itrontask03.doc @@ -10,19 +10,19 @@ # http://www.OARcorp.com/rtems/license.html. # - - This file describes the directives and concepts tested by this test set. +This test is based upon the test in sp0. -test set name: test2 +test set name: itrontask03 directives: - ext_tsk, cre_tsk, sta_tsk, rot_rdq + chg_pri cre_tsk del_tsk exd_tsk rot_rdq sta_tsk sus_tsk ter_tsk + +concepts: XXX - Verify - ex_start, t_create, t_start, tm_tick, i_return, t_ident, - t_delete, tm_wkafter, t_setpri, t_suspend + a. verifies rot_rdq can be used by a task to correctly yeild the processor -concepts: + b. Verifies sus_tsk suspends another task. a. Verifies that a task can delete another task and also delete itself. @@ -38,3 +38,16 @@ concepts: f. Verifies the break statement in the _Block_activate routine. g. Verifies the while loop in the _Prev_tcb routine. + +notes: + + rtems_wake_after calls should be replaced with itron calls when + the time functionality is added. + +output: + + + + + + diff --git a/c/src/tests/itrontests/itrontask03/itrontask03.scn b/c/src/tests/itrontests/itrontask03/itrontask03.scn index 1ee0401494..7cb5f948eb 100644 --- a/c/src/tests/itrontests/itrontask03/itrontask03.scn +++ b/c/src/tests/itrontests/itrontask03/itrontask03.scn @@ -6,7 +6,7 @@ TA1 - rtems_task_wake_after - sleep 1 second TA2 - rtems_task_wake_after - sleep 1 minute TA3 - rtems_task_wake_after - sleep 5 seconds TA1 - chg_pri - set TA3's priority to 2 -TA1 - rtems_task_suspend - suspend TA2 +TA1 - sus_tsk - suspend TA2 TA1 - - delete TA2 TA1 - rtems_task_wake_after - sleep for 5 seconds TA3 - exd_tsk - exit and delete self diff --git a/c/src/tests/itrontests/itrontask03/system.h b/c/src/tests/itrontests/itrontask03/system.h index 51af0eaca6..4e4a1ac7ae 100644 --- a/c/src/tests/itrontests/itrontask03/system.h +++ b/c/src/tests/itrontests/itrontask03/system.h @@ -15,6 +15,7 @@ */ #include +#include /* functions */ diff --git a/c/src/tests/itrontests/itrontask03/task1.c b/c/src/tests/itrontests/itrontask03/task1.c index 30a6078956..7c9ea52060 100644 --- a/c/src/tests/itrontests/itrontask03/task1.c +++ b/c/src/tests/itrontests/itrontask03/task1.c @@ -38,7 +38,7 @@ void Task_1() puts( "TA1 - chg_pri - set TA3's priority to 2" ); - puts( "TA1 - rtems_task_suspend - suspend TA2" ); + puts( "TA1 - sus_tsk - suspend TA2" ); status = sus_tsk( TA2_ID ); directive_failed( status, "sus_tsk of TA2" ); diff --git a/c/src/tests/itrontests/itrontask04/itrontask04.doc b/c/src/tests/itrontests/itrontask04/itrontask04.doc index a4c7d592a9..176d67da74 100644 --- a/c/src/tests/itrontests/itrontask04/itrontask04.doc +++ b/c/src/tests/itrontests/itrontask04/itrontask04.doc @@ -12,12 +12,36 @@ This file describes the directives and concepts tested by this test set. -test set name: 2 - This test check task suspend and resume functionality. +test set name: itrontask04 directives: + chg_pri cre_tsk dis_dsp ena_dsp exd_tsk frsm_tsk rot_rdq rsm_tsk + sta_tsk sus_tsk -concepts: +concepts: - a. + a. This test check task suspend and resume functionality. + + b. Verifies the suspend count works correctly. + c. Verifies the forced resume works correctly + + d. Verifies the rotate ready queue works correctly + + e. Verifies a task called with rtems suspend can be resumed + with an itron resume call. ( XXX - May not be necessary. ) + + +notes: + + This verision of ITRON does not provide a way for a task to + suspend itself (only another task can suspend it). Therefore, + the test calls rtems_task_suspend to suspend it. + + rtems_task_wake_after calls should be replaced with itron call + when the ITRON functionality is finished. + +output: + + XXX - Verify the output messages on this test. It looks like + the suspend count doesn't look correct. ??? Nov 10, 99 diff --git a/c/src/tests/itrontests/itrontask04/system.h b/c/src/tests/itrontests/itrontask04/system.h index 51af0eaca6..4e4a1ac7ae 100644 --- a/c/src/tests/itrontests/itrontask04/system.h +++ b/c/src/tests/itrontests/itrontask04/system.h @@ -15,6 +15,7 @@ */ #include +#include /* functions */ diff --git a/c/src/tests/itrontests/itrontime01/system.h b/c/src/tests/itrontests/itrontime01/system.h index d7a30d195b..425c8f7e7a 100644 --- a/c/src/tests/itrontests/itrontime01/system.h +++ b/c/src/tests/itrontests/itrontime01/system.h @@ -15,6 +15,7 @@ */ #include +#include /* functions */ -- cgit v1.2.3