summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smp05
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/smp05
parentbsp/gen83xx: Fix BSP options for MPC8348EAMDS (diff)
downloadrtems-57c8805648dab577fa460fbf09f4ce920c59ca19.tar.bz2
smptests: Be successful on one processor
Diffstat (limited to 'testsuites/smptests/smp05')
-rw-r--r--testsuites/smptests/smp05/init.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testsuites/smptests/smp05/init.c b/testsuites/smptests/smp05/init.c
index db36e03b4c..c666c2798e 100644
--- a/testsuites/smptests/smp05/init.c
+++ b/testsuites/smptests/smp05/init.c
@@ -14,13 +14,18 @@
#include <tmacros.h>
#include "test_support.h"
+static void success(void)
+{
+ locked_printf( "*** END OF TEST SMP05 ***\n" );
+ rtems_test_exit( 0 );
+}
+
rtems_task Test_task(
rtems_task_argument argument
)
{
locked_printf( "Shut down from CPU %" PRIu32 "\n", rtems_smp_get_current_processor() );
- locked_printf( "*** END OF TEST SMP05 ***\n" );
- rtems_test_exit(0);
+ success();
}
rtems_task Init(
@@ -36,6 +41,10 @@ rtems_task Init(
locked_print_initialize();
locked_printf( "\n\n*** TEST SMP05 ***\n" );
+ if ( rtems_smp_get_processor_count() == 1 ) {
+ success();
+ }
+
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
ch = '1' + i;