diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-26 10:35:45 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-29 11:28:32 +0200 |
commit | f3d9f2288e957caabaa1a312096cb72f8e748807 (patch) | |
tree | 77f9b56b9d7404401a4b0c7af18bcb9f3ae2d39c /testsuites/smptests | |
parent | score: Add red-black tree node to Scheduler_Node (diff) | |
download | rtems-f3d9f2288e957caabaa1a312096cb72f8e748807.tar.bz2 |
score: Add SMP EDF scheduler
Update #3056.
Diffstat (limited to 'testsuites/smptests')
-rw-r--r-- | testsuites/smptests/Makefile.am | 1 | ||||
-rw-r--r-- | testsuites/smptests/configure.ac | 1 | ||||
-rw-r--r-- | testsuites/smptests/smpscheduler03/test.c | 5 | ||||
-rw-r--r-- | testsuites/smptests/smpscheduler07/Makefile.am | 19 | ||||
-rw-r--r-- | testsuites/smptests/smpscheduler07/init.c | 51 | ||||
-rw-r--r-- | testsuites/smptests/smpscheduler07/smpscheduler07.doc | 11 | ||||
-rw-r--r-- | testsuites/smptests/smpscheduler07/smpscheduler07.scn | 2 |
7 files changed, 90 insertions, 0 deletions
diff --git a/testsuites/smptests/Makefile.am b/testsuites/smptests/Makefile.am index 3df76c1d67..6c1bd1294f 100644 --- a/testsuites/smptests/Makefile.am +++ b/testsuites/smptests/Makefile.am @@ -42,6 +42,7 @@ _SUBDIRS += smpscheduler03 _SUBDIRS += smpscheduler04 _SUBDIRS += smpscheduler05 _SUBDIRS += smpscheduler06 +_SUBDIRS += smpscheduler07 _SUBDIRS += smpsignal01 _SUBDIRS += smpstrongapa01 _SUBDIRS += smpswitchextension01 diff --git a/testsuites/smptests/configure.ac b/testsuites/smptests/configure.ac index 54a75f777d..59b27ef397 100644 --- a/testsuites/smptests/configure.ac +++ b/testsuites/smptests/configure.ac @@ -97,6 +97,7 @@ smpscheduler03/Makefile smpscheduler04/Makefile smpscheduler05/Makefile smpscheduler06/Makefile +smpscheduler07/Makefile smpsignal01/Makefile smpstrongapa01/Makefile smpswitchextension01/Makefile diff --git a/testsuites/smptests/smpscheduler03/test.c b/testsuites/smptests/smpscheduler03/test.c index 32bd67cdc2..3f6b9e3fd8 100644 --- a/testsuites/smptests/smpscheduler03/test.c +++ b/testsuites/smptests/smpscheduler03/test.c @@ -37,6 +37,11 @@ static void apply_priority( Thread_queue_Context *queue_context ) { + const Scheduler_Control *scheduler; + + scheduler = _Thread_Scheduler_get_home(thread); + new_priority = _Scheduler_Map_priority(scheduler, new_priority); + _Thread_queue_Context_initialize(queue_context); _Thread_queue_Context_clear_priority_updates(queue_context); _Thread_Wait_acquire(thread, queue_context); diff --git a/testsuites/smptests/smpscheduler07/Makefile.am b/testsuites/smptests/smpscheduler07/Makefile.am new file mode 100644 index 0000000000..f981544628 --- /dev/null +++ b/testsuites/smptests/smpscheduler07/Makefile.am @@ -0,0 +1,19 @@ +rtems_tests_PROGRAMS = smpscheduler07 +smpscheduler07_SOURCES = init.c ../smpscheduler03/test.c + +dist_rtems_tests_DATA = smpscheduler07.scn smpscheduler07.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 = $(smpscheduler07_OBJECTS) +LINK_LIBS = $(smpscheduler07_LDLIBS) + +smpscheduler07$(EXEEXT): $(smpscheduler07_OBJECTS) $(smpscheduler07_DEPENDENCIES) + @rm -f smpscheduler07$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/smptests/smpscheduler07/init.c b/testsuites/smptests/smpscheduler07/init.c new file mode 100644 index 0000000000..cbffe89012 --- /dev/null +++ b/testsuites/smptests/smpscheduler07/init.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems.h> +#include <rtems/test.h> + +void Init(rtems_task_argument arg); + +const char rtems_test_name[] = "SMPSCHEDULER 7"; + +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_MAXIMUM_PROCESSORS 1 + +#define CONFIGURE_SCHEDULER_EDF_SMP + +#include <rtems/scheduler.h> + +RTEMS_SCHEDULER_CONTEXT_EDF_SMP(a); + +#define CONFIGURE_SCHEDULER_CONTROLS \ + RTEMS_SCHEDULER_CONTROL_EDF_SMP( a, rtems_build_name('T', 'E', 'S', 'T')) + +#define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \ + RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY) + +#define CONFIGURE_MAXIMUM_TASKS 3 + +#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> diff --git a/testsuites/smptests/smpscheduler07/smpscheduler07.doc b/testsuites/smptests/smpscheduler07/smpscheduler07.doc new file mode 100644 index 0000000000..80f7a2474d --- /dev/null +++ b/testsuites/smptests/smpscheduler07/smpscheduler07.doc @@ -0,0 +1,11 @@ +This file describes the directives and concepts tested by this test set. + +test set name: smpscheduler07 + +directives: + + - Scheduler operations. + +concepts: + + - Ensure that the scheduler operations basically work. diff --git a/testsuites/smptests/smpscheduler07/smpscheduler07.scn b/testsuites/smptests/smpscheduler07/smpscheduler07.scn new file mode 100644 index 0000000000..73db66938b --- /dev/null +++ b/testsuites/smptests/smpscheduler07/smpscheduler07.scn @@ -0,0 +1,2 @@ +*** BEGIN OF TEST SMPSCHEDULER 7 *** +*** END OF TEST SMPSCHEDULER 7 *** |