summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smp02
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-19 10:12:13 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-22 16:45:58 +0200
commit57c8805648dab577fa460fbf09f4ce920c59ca19 (patch)
tree2cd09c17d5494f0ad16ec34b60b0fdc73b8c9388 /testsuites/smptests/smp02
parentbsp/gen83xx: Fix BSP options for MPC8348EAMDS (diff)
downloadrtems-57c8805648dab577fa460fbf09f4ce920c59ca19.tar.bz2
smptests: Be successful on one processor
Diffstat (limited to 'testsuites/smptests/smp02')
-rw-r--r--testsuites/smptests/smp02/init.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testsuites/smptests/smp02/init.c b/testsuites/smptests/smp02/init.c
index d053b31377..509fed01b8 100644
--- a/testsuites/smptests/smp02/init.c
+++ b/testsuites/smptests/smp02/init.c
@@ -17,6 +17,12 @@
#include <stdio.h>
#include <inttypes.h>
+static void success(void)
+{
+ locked_printf( "*** END OF TEST SMP02 ***\n" );
+ rtems_test_exit( 0 );
+}
+
rtems_task Init(
rtems_task_argument argument
)
@@ -31,6 +37,10 @@ rtems_task Init(
locked_print_initialize();
locked_printf( "\n\n*** SMP02 TEST ***\n" );
+ if ( rtems_smp_get_processor_count() == 1 ) {
+ success();
+ }
+
/* Create/verify synchronisation semaphore */
status = rtems_semaphore_create(
rtems_build_name ('S', 'E', 'M', '1'),
@@ -95,6 +105,5 @@ rtems_task Init(
}
}
- locked_printf( "*** END OF TEST SMP02 ***\n" );
- rtems_test_exit( 0 );
+ success();
}