[PATCH] smptests/smpcache01: Disable SMP cache manager test when not applicable
Daniel Cederman
cederman at gaisler.com
Mon Sep 1 11:15:19 UTC 2014
---
testsuites/smptests/smpcache01/init.c | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/testsuites/smptests/smpcache01/init.c b/testsuites/smptests/smpcache01/init.c
index dd2f9f1..48154d4 100644
--- a/testsuites/smptests/smpcache01/init.c
+++ b/testsuites/smptests/smpcache01/init.c
@@ -20,6 +20,8 @@
const char rtems_test_name[] = "SMPCACHE 1";
+char test_is_applicable = 1;
+
#define CPU_COUNT 32
#define WORKER_PRIORITY 100
@@ -33,7 +35,19 @@ _Cache_manager_Send_smp_msg(
Cache_manager_Function_ptr func,
const void * addr,
size_t size
- );
+ ) __attribute__((weak));
+
+void
+_Cache_manager_Send_smp_msg(
+ const size_t setsize,
+ const cpu_set_t *set,
+ Cache_manager_Function_ptr func,
+ const void * addr,
+ size_t size
+ )
+{
+ test_is_applicable = 0;
+}
typedef struct {
SMP_barrier_Control barrier;
@@ -44,6 +58,11 @@ static test_context ctx = {
.barrier = SMP_BARRIER_CONTROL_INITIALIZER,
};
+static void test_applicable( const void *d_addr, size_t n_bytes )
+{
+ test_is_applicable = 1;
+}
+
static void test_cache_message( const void *d_addr, size_t n_bytes )
{
rtems_test_assert(n_bytes == 123);
@@ -260,12 +279,16 @@ static void test_smp_cache_manager( void )
all_tests();
}
-
static void Init(rtems_task_argument arg)
{
TEST_BEGIN();
- test_smp_cache_manager();
+ _Cache_manager_Send_smp_msg( 0, 0, test_applicable, 0, 123 );
+
+ if ( test_is_applicable )
+ test_smp_cache_manager();
+ else
+ printf("Test not applicable!\n");
TEST_END();
rtems_test_exit(0);
--
2.1.0
More information about the devel
mailing list