summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/ChangeLog6
-rw-r--r--testsuites/support/include/tmacros.h12
2 files changed, 16 insertions, 2 deletions
diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog
index 72a3d9d5da..acc2d2c419 100644
--- a/testsuites/ChangeLog
+++ b/testsuites/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-01 Jennifer Averett <Jennifer.Averett@OARcorp.com>
+
+ * support/include/tmacros.h: Disable the check for dispatch disable
+ level for SMP tests. Another CPU may be inside RTEMS by the time
+ these checks are being done which would result in false failures.
+
2011-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac, support/include/test_support.h:
diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h
index 260bf685fb..9fb3c45098 100644
--- a/testsuites/support/include/tmacros.h
+++ b/testsuites/support/include/tmacros.h
@@ -45,8 +45,15 @@ extern "C" {
/*
* Check that that the dispatch disable level is proper for the
* mode/state of the test. Normally it should be 0 when in task space.
+ *
+ * This test is only valid when in a non smp system. In an smp system
+ * another cpu may be accessing the core at any point when this core
+ * does not have it locked.
*/
-#define check_dispatch_disable_level( _expect ) \
+#if defined SMPTEST
+ #define check_dispatch_disable_level( _expect )
+#else
+ #define check_dispatch_disable_level( _expect ) \
do { \
if ( (_expect) != -1 \
&& ((_Thread_Dispatch_in_critical_section() == false && (_expect) != 0) \
@@ -55,11 +62,12 @@ extern "C" {
printk( \
"\n_Thread_Dispatch_disable_level is (%" PRId32 \
") not %d detected at %s:%d\n", \
- _Thread_Dispatch_get_disable_level(), (_expect), __FILE__, __LINE__ ); \
+ _Thread_Dispatch_in_critical_section(), (_expect), __FILE__, __LINE__ ); \
FLUSH_OUTPUT(); \
rtems_test_exit( 1 ); \
} \
} while ( 0 )
+#endif
/*
* These macros properly report errors within the Classic API