mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac: Add test for Thread Queue extract a thread not blocked on a thread queue. * spthreadq01/.cvsignore, spthreadq01/Makefile.am, spthreadq01/init.c, spthreadq01/spthreadq01.doc, spthreadq01/spthreadq01.scn: New files.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, configure.ac: Add test for Thread Queue extract a thread
|
||||||
|
not blocked on a thread queue.
|
||||||
|
* spthreadq01/.cvsignore, spthreadq01/Makefile.am, spthreadq01/init.c,
|
||||||
|
spthreadq01/spthreadq01.doc, spthreadq01/spthreadq01.scn: New files.
|
||||||
|
|
||||||
2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* Makefile.am, configure.ac: Add test for timespec divide by zero.
|
* Makefile.am, configure.ac: Add test for timespec divide by zero.
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
|
|||||||
sp29 sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 \
|
sp29 sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 \
|
||||||
sp44 sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 \
|
sp44 sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 \
|
||||||
sp58 \
|
sp58 \
|
||||||
spchain spobjgetnext spprintk spsize spstkalloc spwatchdog spwkspace \
|
spchain spobjgetnext spprintk spsize spstkalloc spthreadq01 \
|
||||||
|
spwatchdog spwkspace \
|
||||||
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
||||||
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12
|
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ spobjgetnext/Makefile
|
|||||||
spprintk/Makefile
|
spprintk/Makefile
|
||||||
spsize/Makefile
|
spsize/Makefile
|
||||||
spstkalloc/Makefile
|
spstkalloc/Makefile
|
||||||
|
spthreadq01/Makefile
|
||||||
spwatchdog/Makefile
|
spwatchdog/Makefile
|
||||||
spwkspace/Makefile
|
spwkspace/Makefile
|
||||||
])
|
])
|
||||||
|
|||||||
2
testsuites/sptests/spthreadq01/.cvsignore
Normal file
2
testsuites/sptests/spthreadq01/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
28
testsuites/sptests/spthreadq01/Makefile.am
Normal file
28
testsuites/sptests/spthreadq01/Makefile.am
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
##
|
||||||
|
## $Id$
|
||||||
|
##
|
||||||
|
|
||||||
|
MANAGERS = all
|
||||||
|
|
||||||
|
rtems_tests_PROGRAMS = spthreadq01
|
||||||
|
spthreadq01_SOURCES = init.c
|
||||||
|
|
||||||
|
dist_rtems_tests_DATA = spthreadq01.scn
|
||||||
|
dist_rtems_tests_DATA += spthreadq01.doc
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||||
|
include $(top_srcdir)/../automake/compile.am
|
||||||
|
include $(top_srcdir)/../automake/leaf.am
|
||||||
|
|
||||||
|
spthreadq01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||||
|
|
||||||
|
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||||
|
|
||||||
|
LINK_OBJS = $(spthreadq01_OBJECTS) $(spthreadq01_LDADD)
|
||||||
|
LINK_LIBS = $(spthreadq01_LDLIBS)
|
||||||
|
|
||||||
|
spthreadq01$(EXEEXT): $(spthreadq01_OBJECTS) $(spthreadq01_DEPENDENCIES)
|
||||||
|
@rm -f spthreadq01$(EXEEXT)
|
||||||
|
$(make-exe)
|
||||||
|
|
||||||
|
include $(top_srcdir)/../automake/local.am
|
||||||
56
testsuites/sptests/spthreadq01/init.c
Normal file
56
testsuites/sptests/spthreadq01/init.c
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* 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>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <rtems/score/threadq.h>
|
||||||
|
|
||||||
|
void threadq_first_empty(
|
||||||
|
const char *discipline_string,
|
||||||
|
Thread_queue_Disciplines discipline
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Thread_queue_Control tq;
|
||||||
|
|
||||||
|
printf( "Init - initialize thread queue for %s\n", discipline_string );
|
||||||
|
_Thread_queue_Initialize( &tq, discipline, 0x01, 3 );
|
||||||
|
|
||||||
|
puts( "Init - _Thread_queue_Extract - thread not blocked on a thread queue" );
|
||||||
|
_Thread_queue_Extract( &tq, _Thread_Executing );
|
||||||
|
/* is there anything to check? */
|
||||||
|
}
|
||||||
|
|
||||||
|
rtems_task Init(
|
||||||
|
rtems_task_argument ignored
|
||||||
|
)
|
||||||
|
{
|
||||||
|
puts( "\n\n*** TEST THREAD QUEUE TEST 01 ***" );
|
||||||
|
|
||||||
|
threadq_first_empty( "FIFO", THREAD_QUEUE_DISCIPLINE_FIFO );
|
||||||
|
threadq_first_empty( "Priority", THREAD_QUEUE_DISCIPLINE_PRIORITY );
|
||||||
|
|
||||||
|
puts( "*** END OF TEST THREAD QUEUE TEST 01 ***" );
|
||||||
|
rtems_test_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
23
testsuites/sptests/spthreadq01/spthreadq01.doc
Normal file
23
testsuites/sptests/spthreadq01/spthreadq01.doc
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#
|
||||||
|
# $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: spthreadq01
|
||||||
|
|
||||||
|
directives:
|
||||||
|
|
||||||
|
_Threadq_Extract
|
||||||
|
|
||||||
|
concepts:
|
||||||
|
|
||||||
|
+ Ensure that when an attempt is made to extract a thread which is not blocked
|
||||||
|
on a thread queue, that the behavior is as expected.
|
||||||
6
testsuites/sptests/spthreadq01/spthreadq01.scn
Normal file
6
testsuites/sptests/spthreadq01/spthreadq01.scn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
*** TEST THREAD QUEUE TEST 01 ***
|
||||||
|
Init - initialize thread queue for FIFO
|
||||||
|
Init - _Thread_queue_Extract - thread not blocked on a thread queue
|
||||||
|
Init - initialize thread queue for Priority
|
||||||
|
Init - _Thread_queue_Extract - thread not blocked on a thread queue
|
||||||
|
*** END OF TEST THREAD QUEUE TEST 01 ***
|
||||||
Reference in New Issue
Block a user