diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-18 11:27:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-22 16:46:01 +0200 |
commit | f913c796ffed8fe19e37f9a4dc914f6dca68baa2 (patch) | |
tree | e2206e3529d92283f701c1bdfba4f7b7c1422d47 /testsuites/smptests/smpunsupported01 | |
parent | score: Add and use _ISR_Get_nest_level() (diff) | |
download | rtems-f913c796ffed8fe19e37f9a4dc914f6dca68baa2.tar.bz2 |
sapi: Add rtems_configuration_is_smp_enabled()
Add a configuration field which indicates if the SMP mode of operation
is enabled. This can be used to disable features unsupported on SMP,
e.g task variables.
Diffstat (limited to 'testsuites/smptests/smpunsupported01')
4 files changed, 82 insertions, 0 deletions
diff --git a/testsuites/smptests/smpunsupported01/Makefile.am b/testsuites/smptests/smpunsupported01/Makefile.am new file mode 100644 index 0000000000..6f1826c24c --- /dev/null +++ b/testsuites/smptests/smpunsupported01/Makefile.am @@ -0,0 +1,19 @@ +rtems_tests_PROGRAMS = smpunsupported01 +smpunsupported01_SOURCES = init.c + +dist_rtems_tests_DATA = smpunsupported01.scn smpunsupported01.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 = $(smpunsupported01_OBJECTS) +LINK_LIBS = $(smpunsupported01_LDLIBS) + +smpunsupported01$(EXEEXT): $(smpunsupported01_OBJECTS) $(smpunsupported01_DEPENDENCIES) + @rm -f smpunsupported01$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/smptests/smpunsupported01/init.c b/testsuites/smptests/smpunsupported01/init.c new file mode 100644 index 0000000000..0f1a1023a0 --- /dev/null +++ b/testsuites/smptests/smpunsupported01/init.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2013 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.com/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "tmacros.h" + +static void test(void) +{ + rtems_test_assert(rtems_configuration_is_smp_enabled()); +} + +static void Init(rtems_task_argument arg) +{ + puts("\n\n*** TEST SMPUNSUPPORTED 1 ***"); + + test(); + + puts("*** END OF TEST SMPUNSUPPORTED 1 ***"); + + rtems_test_exit(0); +} + +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_SMP_APPLICATION + +#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 1 + +#define CONFIGURE_MAXIMUM_TASKS 1 + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> diff --git a/testsuites/smptests/smpunsupported01/smpunsupported01.doc b/testsuites/smptests/smpunsupported01/smpunsupported01.doc new file mode 100644 index 0000000000..954bf300c4 --- /dev/null +++ b/testsuites/smptests/smpunsupported01/smpunsupported01.doc @@ -0,0 +1,11 @@ +This file describes the directives and concepts tested by this test set. + +test set name: smpunsupported01 + +directives: + + - rtems_configuration_is_smp_enabled() + +concepts: + + - Ensure that functions unsupported on SMP return an error status. diff --git a/testsuites/smptests/smpunsupported01/smpunsupported01.scn b/testsuites/smptests/smpunsupported01/smpunsupported01.scn new file mode 100644 index 0000000000..a4ced68747 --- /dev/null +++ b/testsuites/smptests/smpunsupported01/smpunsupported01.scn @@ -0,0 +1,2 @@ +*** TEST SMPUNSUPPORTED 1 *** +*** END OF TEST SMPUNSUPPORTED 1 *** |