[PATCH 01/13] tests: Remove superfluous SMPTESTS define

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Nov 8 14:02:49 UTC 2019


Update #3818.
---
 testsuites/smptests/Makefile.am      | 14 +++++++-------
 testsuites/sptests/Makefile.am       |  2 +-
 testsuites/support/include/tmacros.h | 10 +---------
 3 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/testsuites/smptests/Makefile.am b/testsuites/smptests/Makefile.am
index 38cc87e3c5..698aaee6f8 100644
--- a/testsuites/smptests/Makefile.am
+++ b/testsuites/smptests/Makefile.am
@@ -21,7 +21,7 @@ smp_docs += smp01/smp01.doc
 smp01_SOURCES = smp01/init.c smp01/tasks.c smp01/system.h \
 	../support/src/locked_print.c
 smp01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_smp01) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 endif
 
@@ -33,7 +33,7 @@ smp_docs += smp02/smp02.doc
 smp02_SOURCES = smp02/init.c smp02/tasks.c smp02/system.h \
 	../support/src/locked_print.c
 smp02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_smp02) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 endif
 
@@ -45,7 +45,7 @@ smp_docs += smp03/smp03.doc
 smp03_SOURCES = smp03/init.c smp03/tasks.c smp03/system.h \
 	../support/src/locked_print.c
 smp03_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_smp03) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 endif
 
@@ -56,7 +56,7 @@ smp_screens += smp05/smp05.scn
 smp_docs += smp05/smp05.doc
 smp05_SOURCES = smp05/init.c ../support/src/locked_print.c
 smp05_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_smp05) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 endif
 
@@ -67,7 +67,7 @@ smp_screens += smp07/smp07.scn
 smp_docs += smp07/smp07.doc
 smp07_SOURCES = smp07/init.c ../support/src/locked_print.c
 smp07_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_smp07) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 endif
 
@@ -79,7 +79,7 @@ smp_docs += smp08/smp08.doc
 smp08_SOURCES = smp08/init.c smp08/tasks.c smp08/system.h \
 	../support/src/locked_print.c
 smp08_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_smp08) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 endif
 
@@ -90,7 +90,7 @@ smp_screens += smp09/smp09.scn
 smp_docs += smp09/smp09.doc
 smp09_SOURCES = smp09/init.c ../support/src/locked_print.c
 smp09_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_smp09) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 endif
 
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index eae563051a..95192a3652 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -769,7 +769,7 @@ sp_screens += spcpuset01/spcpuset01.scn
 sp_docs += spcpuset01/spcpuset01.doc
 spcpuset01_SOURCES = spcpuset01/test.c spcpuset01/init.c
 spcpuset01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spcpuset01) \
-	$(support_includes) -DSMPTEST
+	$(support_includes)
 endif
 
 if HAS_CPLUSPLUS
diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h
index 60da7647dc..ff016605db 100644
--- a/testsuites/support/include/tmacros.h
+++ b/testsuites/support/include/tmacros.h
@@ -46,15 +46,8 @@ 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.
  */
-#if defined SMPTEST
- #define check_dispatch_disable_level( _expect )
-#else
- #define check_dispatch_disable_level( _expect ) \
+#define check_dispatch_disable_level( _expect ) \
   do { \
     if ( (_expect) != -1 \
            && (((!_Thread_Dispatch_is_enabled()) == false && (_expect) != 0) \
@@ -67,7 +60,6 @@ extern "C" {
       rtems_test_exit( 1 ); \
     } \
   } while ( 0 )
-#endif
 
 /*
  *  Check that that the allocator mutex is not owned by the executing thread.
-- 
2.16.4



More information about the devel mailing list