forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -13,10 +13,9 @@ $(PREINSTALLDIRS):
|
|||||||
|
|
||||||
all-local: $(PREINSTALLDIRS)
|
all-local: $(PREINSTALLDIRS)
|
||||||
|
|
||||||
ITRON_DIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
|
SUBDIRS = . itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
|
||||||
itronmbf01 itronsem01 itrontime01
|
itronmbf01 itronsem01 itrontime01
|
||||||
|
|
||||||
SUBDIRS = $(ITRON_DIRS)
|
|
||||||
|
|
||||||
include $(top_srcdir)/../../../../automake/subdirs.am
|
include $(top_srcdir)/../../../../automake/subdirs.am
|
||||||
include $(top_srcdir)/../../../../automake/local.am
|
include $(top_srcdir)/../../../../automake/local.am
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ void TestPrcv();
|
|||||||
|
|
||||||
void ITRON_Init( void )
|
void ITRON_Init( void )
|
||||||
{
|
{
|
||||||
printf( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***\n" );
|
puts( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***" );
|
||||||
|
|
||||||
|
#if 0
|
||||||
TestCre();
|
TestCre();
|
||||||
TestDel();
|
TestDel();
|
||||||
TestPsnd();
|
TestPsnd();
|
||||||
@@ -57,8 +58,11 @@ void ITRON_Init( void )
|
|||||||
TestRef();
|
TestRef();
|
||||||
TestPrcv();
|
TestPrcv();
|
||||||
TestTrcv();
|
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);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -13,12 +13,10 @@
|
|||||||
This file describes the directives and concepts tested by this test set.
|
This file describes the directives and concepts tested by this test set.
|
||||||
This test is based upon the test in sp01.
|
This test is based upon the test in sp01.
|
||||||
|
|
||||||
test set name: test1
|
test set name: itrontask01
|
||||||
|
|
||||||
directives:
|
directives:
|
||||||
cre_tsk, sta_tsk, exd_tsk, get_tid
|
cre_tsk, exd_tsk, get_tid, sta_tsk
|
||||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
|
||||||
tm_set, tm_get, tm_wkafter
|
|
||||||
|
|
||||||
concepts: XXX verify
|
concepts: XXX verify
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
This test forces and verifies error conditions for the task and task
|
||||||
synchronization managers..
|
synchronization managers..
|
||||||
|
|
||||||
test set name:
|
test set name: itrontask02
|
||||||
|
|
||||||
directives:
|
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:
|
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.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -10,19 +10,19 @@
|
|||||||
# http://www.OARcorp.com/rtems/license.html.
|
# http://www.OARcorp.com/rtems/license.html.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This file describes the directives and concepts tested by this test set.
|
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:
|
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
|
||||||
|
|
||||||
ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
concepts: XXX - Verify
|
||||||
t_delete, tm_wkafter, t_setpri, t_suspend
|
|
||||||
|
|
||||||
concepts:
|
a. verifies rot_rdq can be used by a task to correctly yeild the processor
|
||||||
|
|
||||||
|
b. Verifies sus_tsk suspends another task.
|
||||||
|
|
||||||
a. Verifies that a task can delete another task and also delete itself.
|
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.
|
f. Verifies the break statement in the _Block_activate routine.
|
||||||
|
|
||||||
g. Verifies the while loop in the _Prev_tcb 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:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ TA1 - rtems_task_wake_after - sleep 1 second
|
|||||||
TA2 - rtems_task_wake_after - sleep 1 minute
|
TA2 - rtems_task_wake_after - sleep 1 minute
|
||||||
TA3 - rtems_task_wake_after - sleep 5 seconds
|
TA3 - rtems_task_wake_after - sleep 5 seconds
|
||||||
TA1 - chg_pri - set TA3's priority to 2
|
TA1 - chg_pri - set TA3's priority to 2
|
||||||
TA1 - rtems_task_suspend - suspend TA2
|
TA1 - sus_tsk - suspend TA2
|
||||||
TA1 - - delete TA2
|
TA1 - - delete TA2
|
||||||
TA1 - rtems_task_wake_after - sleep for 5 seconds
|
TA1 - rtems_task_wake_after - sleep for 5 seconds
|
||||||
TA3 - exd_tsk - exit and delete self
|
TA3 - exd_tsk - exit and delete self
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ void Task_1()
|
|||||||
|
|
||||||
puts( "TA1 - chg_pri - set TA3's priority to 2" );
|
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 );
|
status = sus_tsk( TA2_ID );
|
||||||
directive_failed( status, "sus_tsk of TA2" );
|
directive_failed( status, "sus_tsk of TA2" );
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,36 @@
|
|||||||
|
|
||||||
This file describes the directives and concepts tested by this test set.
|
This file describes the directives and concepts tested by this test set.
|
||||||
|
|
||||||
test set name: 2
|
test set name: itrontask04
|
||||||
This test check task suspend and resume functionality.
|
|
||||||
|
|
||||||
directives:
|
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
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,9 @@ $(PREINSTALLDIRS):
|
|||||||
|
|
||||||
all-local: $(PREINSTALLDIRS)
|
all-local: $(PREINSTALLDIRS)
|
||||||
|
|
||||||
ITRON_DIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
|
SUBDIRS = . itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
|
||||||
itronmbf01 itronsem01 itrontime01
|
itronmbf01 itronsem01 itrontime01
|
||||||
|
|
||||||
SUBDIRS = $(ITRON_DIRS)
|
|
||||||
|
|
||||||
include $(top_srcdir)/../../../../automake/subdirs.am
|
include $(top_srcdir)/../../../../automake/subdirs.am
|
||||||
include $(top_srcdir)/../../../../automake/local.am
|
include $(top_srcdir)/../../../../automake/local.am
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ void TestPrcv();
|
|||||||
|
|
||||||
void ITRON_Init( void )
|
void ITRON_Init( void )
|
||||||
{
|
{
|
||||||
printf( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***\n" );
|
puts( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***" );
|
||||||
|
|
||||||
|
#if 0
|
||||||
TestCre();
|
TestCre();
|
||||||
TestDel();
|
TestDel();
|
||||||
TestPsnd();
|
TestPsnd();
|
||||||
@@ -57,8 +58,11 @@ void ITRON_Init( void )
|
|||||||
TestRef();
|
TestRef();
|
||||||
TestPrcv();
|
TestPrcv();
|
||||||
TestTrcv();
|
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);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -13,12 +13,10 @@
|
|||||||
This file describes the directives and concepts tested by this test set.
|
This file describes the directives and concepts tested by this test set.
|
||||||
This test is based upon the test in sp01.
|
This test is based upon the test in sp01.
|
||||||
|
|
||||||
test set name: test1
|
test set name: itrontask01
|
||||||
|
|
||||||
directives:
|
directives:
|
||||||
cre_tsk, sta_tsk, exd_tsk, get_tid
|
cre_tsk, exd_tsk, get_tid, sta_tsk
|
||||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
|
||||||
tm_set, tm_get, tm_wkafter
|
|
||||||
|
|
||||||
concepts: XXX verify
|
concepts: XXX verify
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
This test forces and verifies error conditions for the task and task
|
||||||
synchronization managers..
|
synchronization managers..
|
||||||
|
|
||||||
test set name:
|
test set name: itrontask02
|
||||||
|
|
||||||
directives:
|
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:
|
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.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -10,19 +10,19 @@
|
|||||||
# http://www.OARcorp.com/rtems/license.html.
|
# http://www.OARcorp.com/rtems/license.html.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This file describes the directives and concepts tested by this test set.
|
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:
|
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
|
||||||
|
|
||||||
ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
concepts: XXX - Verify
|
||||||
t_delete, tm_wkafter, t_setpri, t_suspend
|
|
||||||
|
|
||||||
concepts:
|
a. verifies rot_rdq can be used by a task to correctly yeild the processor
|
||||||
|
|
||||||
|
b. Verifies sus_tsk suspends another task.
|
||||||
|
|
||||||
a. Verifies that a task can delete another task and also delete itself.
|
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.
|
f. Verifies the break statement in the _Block_activate routine.
|
||||||
|
|
||||||
g. Verifies the while loop in the _Prev_tcb 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:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ TA1 - rtems_task_wake_after - sleep 1 second
|
|||||||
TA2 - rtems_task_wake_after - sleep 1 minute
|
TA2 - rtems_task_wake_after - sleep 1 minute
|
||||||
TA3 - rtems_task_wake_after - sleep 5 seconds
|
TA3 - rtems_task_wake_after - sleep 5 seconds
|
||||||
TA1 - chg_pri - set TA3's priority to 2
|
TA1 - chg_pri - set TA3's priority to 2
|
||||||
TA1 - rtems_task_suspend - suspend TA2
|
TA1 - sus_tsk - suspend TA2
|
||||||
TA1 - - delete TA2
|
TA1 - - delete TA2
|
||||||
TA1 - rtems_task_wake_after - sleep for 5 seconds
|
TA1 - rtems_task_wake_after - sleep for 5 seconds
|
||||||
TA3 - exd_tsk - exit and delete self
|
TA3 - exd_tsk - exit and delete self
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ void Task_1()
|
|||||||
|
|
||||||
puts( "TA1 - chg_pri - set TA3's priority to 2" );
|
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 );
|
status = sus_tsk( TA2_ID );
|
||||||
directive_failed( status, "sus_tsk of TA2" );
|
directive_failed( status, "sus_tsk of TA2" );
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,36 @@
|
|||||||
|
|
||||||
This file describes the directives and concepts tested by this test set.
|
This file describes the directives and concepts tested by this test set.
|
||||||
|
|
||||||
test set name: 2
|
test set name: itrontask04
|
||||||
This test check task suspend and resume functionality.
|
|
||||||
|
|
||||||
directives:
|
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
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <itron.h>
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user