summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-10-19 16:39:16 +1100
committerChris Johns <chrisj@rtems.org>2017-10-23 16:25:45 +1100
commit98c6d501452f02264ff148a1b8479e420c81562d (patch)
tree8c6cd90ccd1df98f782396d94d6acdbfe5d042cb /testsuites/psxtests
parentposix: Fix POSIX disabled build (diff)
downloadrtems-98c6d501452f02264ff148a1b8479e420c81562d.tar.bz2
testsuite: Use printk for all test output where possible.
- Remove the printf support leaving the direct printk support configured with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf call to printk. - Control the test's single init for functions and global data with TEST_INIT and not CONFIGURE_INIT. They are now separate. Updates #3170.
Diffstat (limited to 'testsuites/psxtests')
-rw-r--r--testsuites/psxtests/include/pmacros.h1
-rw-r--r--testsuites/psxtests/psx01/init.c2
-rw-r--r--testsuites/psxtests/psx02/init.c2
-rw-r--r--testsuites/psxtests/psx03/init.c2
-rw-r--r--testsuites/psxtests/psx04/init.c2
-rw-r--r--testsuites/psxtests/psx05/init.c2
-rw-r--r--testsuites/psxtests/psx06/init.c2
-rw-r--r--testsuites/psxtests/psx07/init.c2
-rw-r--r--testsuites/psxtests/psx08/init.c2
-rw-r--r--testsuites/psxtests/psx09/init.c2
-rw-r--r--testsuites/psxtests/psx10/init.c2
-rw-r--r--testsuites/psxtests/psx11/init.c2
-rw-r--r--testsuites/psxtests/psx12/init.c2
-rw-r--r--testsuites/psxtests/psx13/main.c3
-rw-r--r--testsuites/psxtests/psx14/init.c2
-rw-r--r--testsuites/psxtests/psx15/init.c2
-rw-r--r--testsuites/psxtests/psx16/init.c2
-rw-r--r--testsuites/psxtests/psxaio01/init.c2
-rw-r--r--testsuites/psxtests/psxaio02/init.c2
-rw-r--r--testsuites/psxtests/psxaio03/init.c2
-rw-r--r--testsuites/psxtests/psxalarm01/init.c2
-rw-r--r--testsuites/psxtests/psxautoinit01/init.c2
-rw-r--r--testsuites/psxtests/psxautoinit02/init.c2
-rw-r--r--testsuites/psxtests/psxbarrier01/main.c3
-rw-r--r--testsuites/psxtests/psxcancel/init.c2
-rw-r--r--testsuites/psxtests/psxcancel01/init.c2
-rw-r--r--testsuites/psxtests/psxchroot01/main.c3
-rw-r--r--testsuites/psxtests/psxclassic01/init.c2
-rw-r--r--testsuites/psxtests/psxcleanup/psxcleanup.c2
-rw-r--r--testsuites/psxtests/psxcleanup01/init.c2
-rw-r--r--testsuites/psxtests/psxcleanup02/init.c2
-rw-r--r--testsuites/psxtests/psxclock/init.c2
-rw-r--r--testsuites/psxtests/psxclock01/init.c2
-rw-r--r--testsuites/psxtests/psxconcurrency01/init.c2
-rw-r--r--testsuites/psxtests/psxcond01/init.c2
-rw-r--r--testsuites/psxtests/psxcond02/init.c2
-rw-r--r--testsuites/psxtests/psxconfig01/init.c2
-rw-r--r--testsuites/psxtests/psxdevctl01/main.c3
-rw-r--r--testsuites/psxtests/psxeintr_join/init.c2
-rw-r--r--testsuites/psxtests/psxenosys/init.c2
-rw-r--r--testsuites/psxtests/psxfatal_support/init.c2
-rw-r--r--testsuites/psxtests/psxfchx01/init.c2
-rw-r--r--testsuites/psxtests/psxfile01/main.c3
-rw-r--r--testsuites/psxtests/psxfile01/test.c9
-rw-r--r--testsuites/psxtests/psxfile02/init.c2
-rw-r--r--testsuites/psxtests/psxfilelock01/init.c2
-rw-r--r--testsuites/psxtests/psxgetattrnp01/init.c2
-rw-r--r--testsuites/psxtests/psxgetrusage01/init.c2
-rw-r--r--testsuites/psxtests/psxglobalcon01/init.cc2
-rw-r--r--testsuites/psxtests/psxglobalcon02/init.cc2
-rw-r--r--testsuites/psxtests/psxid01/init.c2
-rw-r--r--testsuites/psxtests/psximfs01/init.c43
-rw-r--r--testsuites/psxtests/psximfs02/init.c2
-rw-r--r--testsuites/psxtests/psxintrcritical01/init.c2
-rw-r--r--testsuites/psxtests/psxitimer/init.c2
-rw-r--r--testsuites/psxtests/psxkey01/init.c2
-rw-r--r--testsuites/psxtests/psxkey02/init.c2
-rw-r--r--testsuites/psxtests/psxkey03/init.c2
-rw-r--r--testsuites/psxtests/psxkey04/init.c2
-rw-r--r--testsuites/psxtests/psxkey05/init.c2
-rw-r--r--testsuites/psxtests/psxkey06/init.c2
-rw-r--r--testsuites/psxtests/psxkey07/init.c2
-rw-r--r--testsuites/psxtests/psxkey08/init.c2
-rw-r--r--testsuites/psxtests/psxkey09/init.c2
-rw-r--r--testsuites/psxtests/psxkey10/init.c2
-rw-r--r--testsuites/psxtests/psxmmap01/init.c2
-rw-r--r--testsuites/psxtests/psxmount/main.c3
-rw-r--r--testsuites/psxtests/psxmsgq01/init.c2
-rw-r--r--testsuites/psxtests/psxmsgq02/init.c2
-rw-r--r--testsuites/psxtests/psxmsgq03/init.c2
-rw-r--r--testsuites/psxtests/psxmsgq04/init.c2
-rw-r--r--testsuites/psxtests/psxmutexattr01/init.c2
-rw-r--r--testsuites/psxtests/psxobj01/init.c2
-rw-r--r--testsuites/psxtests/psxonce01/init.c2
-rw-r--r--testsuites/psxtests/psxpasswd01/init.c2
-rw-r--r--testsuites/psxtests/psxpasswd02/init.c2
-rw-r--r--testsuites/psxtests/psxpipe01/init.c2
-rw-r--r--testsuites/psxtests/psxrdwrv/main.c3
-rw-r--r--testsuites/psxtests/psxreaddir/main.c3
-rw-r--r--testsuites/psxtests/psxrwlock01/main.c3
-rw-r--r--testsuites/psxtests/psxsem01/init.c2
-rw-r--r--testsuites/psxtests/psxshm01/init.c2
-rw-r--r--testsuites/psxtests/psxshm02/init.c2
-rw-r--r--testsuites/psxtests/psxsignal01/init.c2
-rw-r--r--testsuites/psxtests/psxsignal02/init.c2
-rw-r--r--testsuites/psxtests/psxsignal03/init.c2
-rw-r--r--testsuites/psxtests/psxsignal05/init.c2
-rw-r--r--testsuites/psxtests/psxsignal06/init.c2
-rw-r--r--testsuites/psxtests/psxspin01/main.c3
-rw-r--r--testsuites/psxtests/psxstack01/init.c2
-rw-r--r--testsuites/psxtests/psxstack02/init.c2
-rw-r--r--testsuites/psxtests/psxstat/main.c3
-rw-r--r--testsuites/psxtests/psxstrsignal01/init.c2
-rw-r--r--testsuites/psxtests/psxsysconf/init.c2
-rw-r--r--testsuites/psxtests/psxthreadname01/init.c2
-rw-r--r--testsuites/psxtests/psxtime/main.c3
-rw-r--r--testsuites/psxtests/psxtimer01/psxtimer.c2
-rw-r--r--testsuites/psxtests/psxtimer02/psxtimer.c2
-rw-r--r--testsuites/psxtests/psxtimes01/init.c2
-rw-r--r--testsuites/psxtests/psxualarm/init.c2
-rw-r--r--testsuites/psxtests/psxusleep/init.c2
101 files changed, 220 insertions, 41 deletions
diff --git a/testsuites/psxtests/include/pmacros.h b/testsuites/psxtests/include/pmacros.h
index be1b8b7567..76e30f5392 100644
--- a/testsuites/psxtests/include/pmacros.h
+++ b/testsuites/psxtests/include/pmacros.h
@@ -86,7 +86,6 @@
(void) ctime_r( &_tv.tv_sec, _time_buffer ); \
_time_buffer[ strlen( _time_buffer ) - 1 ] = 0; \
printf( "%s%s%s\n", s1, _time_buffer, s2 ); \
- fflush(stdout); \
} while ( 0 )
#define empty_line() puts( "" )
diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c
index 2b2fafd0cd..7b7a4ef87c 100644
--- a/testsuites/psxtests/psx01/init.c
+++ b/testsuites/psxtests/psx01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <sched.h>
#include <sys/utsname.h>
diff --git a/testsuites/psxtests/psx02/init.c b/testsuites/psxtests/psx02/init.c
index 0d2ab06c7e..7ea8b9870d 100644
--- a/testsuites/psxtests/psx02/init.c
+++ b/testsuites/psxtests/psx02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <signal.h>
diff --git a/testsuites/psxtests/psx03/init.c b/testsuites/psxtests/psx03/init.c
index 5c5383ccfc..a78c72d0d2 100644
--- a/testsuites/psxtests/psx03/init.c
+++ b/testsuites/psxtests/psx03/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <signal.h>
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c
index 76c76af55b..b35fb68cc8 100644
--- a/testsuites/psxtests/psx04/init.c
+++ b/testsuites/psxtests/psx04/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <signal.h>
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c
index 70e8d4a67d..17249ee6b3 100644
--- a/testsuites/psxtests/psx05/init.c
+++ b/testsuites/psxtests/psx05/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <sched.h>
#define CONFIGURE_INIT
diff --git a/testsuites/psxtests/psx06/init.c b/testsuites/psxtests/psx06/init.c
index e077a28597..e10a7f5096 100644
--- a/testsuites/psxtests/psx06/init.c
+++ b/testsuites/psxtests/psx06/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <errno.h>
diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c
index be5208b32f..b41e77e8b0 100644
--- a/testsuites/psxtests/psx07/init.c
+++ b/testsuites/psxtests/psx07/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <sched.h>
diff --git a/testsuites/psxtests/psx08/init.c b/testsuites/psxtests/psx08/init.c
index 781ac1ed30..b5839eae81 100644
--- a/testsuites/psxtests/psx08/init.c
+++ b/testsuites/psxtests/psx08/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <errno.h>
diff --git a/testsuites/psxtests/psx09/init.c b/testsuites/psxtests/psx09/init.c
index d9226c9abb..db10206f34 100644
--- a/testsuites/psxtests/psx09/init.c
+++ b/testsuites/psxtests/psx09/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <sched.h>
#define CONFIGURE_INIT
diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c
index ad4e60e385..d58024a382 100644
--- a/testsuites/psxtests/psx10/init.c
+++ b/testsuites/psxtests/psx10/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <sched.h>
diff --git a/testsuites/psxtests/psx11/init.c b/testsuites/psxtests/psx11/init.c
index 9adde6e25b..8a4c0c45c5 100644
--- a/testsuites/psxtests/psx11/init.c
+++ b/testsuites/psxtests/psx11/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <sched.h>
#define CONFIGURE_INIT
diff --git a/testsuites/psxtests/psx12/init.c b/testsuites/psxtests/psx12/init.c
index 46fb0161b7..fc96aa03c4 100644
--- a/testsuites/psxtests/psx12/init.c
+++ b/testsuites/psxtests/psx12/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <sys/time.h>
#include <errno.h>
#include <inttypes.h>
diff --git a/testsuites/psxtests/psx13/main.c b/testsuites/psxtests/psx13/main.c
index 62541bb51c..2d9111191d 100644
--- a/testsuites/psxtests/psx13/main.c
+++ b/testsuites/psxtests/psx13/main.c
@@ -9,12 +9,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psx14/init.c b/testsuites/psxtests/psx14/init.c
index 070501f065..94a43fdb6c 100644
--- a/testsuites/psxtests/psx14/init.c
+++ b/testsuites/psxtests/psx14/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <rtems.h>
diff --git a/testsuites/psxtests/psx15/init.c b/testsuites/psxtests/psx15/init.c
index 654f0c87fb..36eadf4b77 100644
--- a/testsuites/psxtests/psx15/init.c
+++ b/testsuites/psxtests/psx15/init.c
@@ -16,6 +16,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <stdio.h>
#include <inttypes.h>
diff --git a/testsuites/psxtests/psx16/init.c b/testsuites/psxtests/psx16/init.c
index 55f652679f..c9ddfeb88b 100644
--- a/testsuites/psxtests/psx16/init.c
+++ b/testsuites/psxtests/psx16/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
#include <pthread.h>
diff --git a/testsuites/psxtests/psxaio01/init.c b/testsuites/psxtests/psxaio01/init.c
index 283507f9cd..32479d41f6 100644
--- a/testsuites/psxtests/psxaio01/init.c
+++ b/testsuites/psxtests/psxaio01/init.c
@@ -10,6 +10,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <rtems.h>
diff --git a/testsuites/psxtests/psxaio02/init.c b/testsuites/psxtests/psxaio02/init.c
index 3c75a365b5..781f01b916 100644
--- a/testsuites/psxtests/psxaio02/init.c
+++ b/testsuites/psxtests/psxaio02/init.c
@@ -10,6 +10,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <rtems.h>
diff --git a/testsuites/psxtests/psxaio03/init.c b/testsuites/psxtests/psxaio03/init.c
index d8a13fa8e4..e0da0ee16e 100644
--- a/testsuites/psxtests/psxaio03/init.c
+++ b/testsuites/psxtests/psxaio03/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <rtems.h>
diff --git a/testsuites/psxtests/psxalarm01/init.c b/testsuites/psxtests/psxalarm01/init.c
index e4ab9b4f4a..d8ef47568b 100644
--- a/testsuites/psxtests/psxalarm01/init.c
+++ b/testsuites/psxtests/psxalarm01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <sys/time.h>
diff --git a/testsuites/psxtests/psxautoinit01/init.c b/testsuites/psxtests/psxautoinit01/init.c
index 9001de2306..630fa1d17d 100644
--- a/testsuites/psxtests/psxautoinit01/init.c
+++ b/testsuites/psxtests/psxautoinit01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
#include <pthread.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxautoinit02/init.c b/testsuites/psxtests/psxautoinit02/init.c
index 5d652f7467..e281746eef 100644
--- a/testsuites/psxtests/psxautoinit02/init.c
+++ b/testsuites/psxtests/psxautoinit02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
#include <pthread.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxbarrier01/main.c b/testsuites/psxtests/psxbarrier01/main.c
index f031c05b3c..a9c98cae11 100644
--- a/testsuites/psxtests/psxbarrier01/main.c
+++ b/testsuites/psxtests/psxbarrier01/main.c
@@ -7,12 +7,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <rtems/test.h>
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxcancel/init.c b/testsuites/psxtests/psxcancel/init.c
index c4c442b668..0e92db6dd4 100644
--- a/testsuites/psxtests/psxcancel/init.c
+++ b/testsuites/psxtests/psxcancel/init.c
@@ -8,6 +8,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
diff --git a/testsuites/psxtests/psxcancel01/init.c b/testsuites/psxtests/psxcancel01/init.c
index fce188ed39..5f4b1f84e7 100644
--- a/testsuites/psxtests/psxcancel01/init.c
+++ b/testsuites/psxtests/psxcancel01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxchroot01/main.c b/testsuites/psxtests/psxchroot01/main.c
index 6dcb307df0..0c1e6a690d 100644
--- a/testsuites/psxtests/psxchroot01/main.c
+++ b/testsuites/psxtests/psxchroot01/main.c
@@ -2,12 +2,13 @@
* Simple test program -- simplified version of sample test hello.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxclassic01/init.c b/testsuites/psxtests/psxclassic01/init.c
index 1acc14142a..e9bca2a227 100644
--- a/testsuites/psxtests/psxclassic01/init.c
+++ b/testsuites/psxtests/psxclassic01/init.c
@@ -17,6 +17,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
#include <stdio.h>
diff --git a/testsuites/psxtests/psxcleanup/psxcleanup.c b/testsuites/psxtests/psxcleanup/psxcleanup.c
index 2af4aaf78d..f3f5de2fc6 100644
--- a/testsuites/psxtests/psxcleanup/psxcleanup.c
+++ b/testsuites/psxtests/psxcleanup/psxcleanup.c
@@ -13,6 +13,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <pthread.h> /* thread facilities */
diff --git a/testsuites/psxtests/psxcleanup01/init.c b/testsuites/psxtests/psxcleanup01/init.c
index f38b48ee93..15f18e25f0 100644
--- a/testsuites/psxtests/psxcleanup01/init.c
+++ b/testsuites/psxtests/psxcleanup01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <rtems.h>
#include "pmacros.h"
#include <pthread.h> /* thread facilities */
diff --git a/testsuites/psxtests/psxcleanup02/init.c b/testsuites/psxtests/psxcleanup02/init.c
index 88ecfee47e..7891e620d9 100644
--- a/testsuites/psxtests/psxcleanup02/init.c
+++ b/testsuites/psxtests/psxcleanup02/init.c
@@ -16,6 +16,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
int main(int argc, char **argv);
diff --git a/testsuites/psxtests/psxclock/init.c b/testsuites/psxtests/psxclock/init.c
index 669f4bb0c4..4aedd3e141 100644
--- a/testsuites/psxtests/psxclock/init.c
+++ b/testsuites/psxtests/psxclock/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <time.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxclock01/init.c b/testsuites/psxtests/psxclock01/init.c
index 6be85d2b70..9178e893c4 100644
--- a/testsuites/psxtests/psxclock01/init.c
+++ b/testsuites/psxtests/psxclock01/init.c
@@ -6,6 +6,8 @@
* http://www.rtems.org/license/LICENSE.
*/
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
diff --git a/testsuites/psxtests/psxconcurrency01/init.c b/testsuites/psxtests/psxconcurrency01/init.c
index 60aef9230d..f93fda0e93 100644
--- a/testsuites/psxtests/psxconcurrency01/init.c
+++ b/testsuites/psxtests/psxconcurrency01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <pthread.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxcond01/init.c b/testsuites/psxtests/psxcond01/init.c
index 574769659a..2e4da67573 100644
--- a/testsuites/psxtests/psxcond01/init.c
+++ b/testsuites/psxtests/psxcond01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
#include <pthread.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxcond02/init.c b/testsuites/psxtests/psxcond02/init.c
index 6314762285..c458cfc672 100644
--- a/testsuites/psxtests/psxcond02/init.c
+++ b/testsuites/psxtests/psxcond02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
#include <pthread.h>
#include <time.h>
diff --git a/testsuites/psxtests/psxconfig01/init.c b/testsuites/psxtests/psxconfig01/init.c
index a1dc4c618f..45bc168f72 100644
--- a/testsuites/psxtests/psxconfig01/init.c
+++ b/testsuites/psxtests/psxconfig01/init.c
@@ -25,6 +25,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <rtems/test.h>
#include <tmacros.h>
diff --git a/testsuites/psxtests/psxdevctl01/main.c b/testsuites/psxtests/psxdevctl01/main.c
index 2228551f1d..664f82cc16 100644
--- a/testsuites/psxtests/psxdevctl01/main.c
+++ b/testsuites/psxtests/psxdevctl01/main.c
@@ -13,12 +13,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxeintr_join/init.c b/testsuites/psxtests/psxeintr_join/init.c
index f0810b50a5..935047d367 100644
--- a/testsuites/psxtests/psxeintr_join/init.c
+++ b/testsuites/psxtests/psxeintr_join/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <stdio.h>
#include <signal.h>
#include <semaphore.h>
diff --git a/testsuites/psxtests/psxenosys/init.c b/testsuites/psxtests/psxenosys/init.c
index e0927446f9..ef9a1baa0e 100644
--- a/testsuites/psxtests/psxenosys/init.c
+++ b/testsuites/psxtests/psxenosys/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <sys/types.h>
#include <sys/wait.h>
#if HAVE_SYS_MMAN_H
diff --git a/testsuites/psxtests/psxfatal_support/init.c b/testsuites/psxtests/psxfatal_support/init.c
index 9b59efa175..50e3abbb2e 100644
--- a/testsuites/psxtests/psxfatal_support/init.c
+++ b/testsuites/psxtests/psxfatal_support/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define TESTS_USE_PRINTK
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxfchx01/init.c b/testsuites/psxtests/psxfchx01/init.c
index 89a0d06033..dc6d537d43 100644
--- a/testsuites/psxtests/psxfchx01/init.c
+++ b/testsuites/psxtests/psxfchx01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
#include <unistd.h>
diff --git a/testsuites/psxtests/psxfile01/main.c b/testsuites/psxtests/psxfile01/main.c
index 554f8e96f8..7b1ea9a827 100644
--- a/testsuites/psxtests/psxfile01/main.c
+++ b/testsuites/psxtests/psxfile01/main.c
@@ -7,12 +7,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c
index 8fcb281307..4f53c1de8a 100644
--- a/testsuites/psxtests/psxfile01/test.c
+++ b/testsuites/psxtests/psxfile01/test.c
@@ -118,7 +118,6 @@ void stat_a_file(
rtems_test_assert( file );
printf( "stat( %s ) returned ", file );
- fflush( stdout );
status = stat( file, &statbuf );
@@ -335,7 +334,7 @@ int main(
status = close( fd );
rtems_test_assert( status == 0 );
- /*
+ /*
* Open a file in read-only mode and try to truncate
*/
@@ -362,7 +361,7 @@ int main(
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EINVAL );
- /*
+ /*
* Read from filedes opened for write
*/
@@ -387,7 +386,7 @@ int main(
puts( "open /tmp/bha in read only mode -- OK" );
fd = open( "/tmp/bha", O_CREAT | O_RDONLY, S_IRWXU|S_IRWXG|S_IRWXO );
rtems_test_assert( fd != -1 );
-
+
puts( "attempt to read from /tmp/bha - expect EBADF" );
status = write( fd, buffer, 10 );
rtems_test_assert( status == -1 );
@@ -398,7 +397,7 @@ int main(
status |= unlink( "/tmp/bha" );
rtems_test_assert( status == 0 );
- /*
+ /*
* Read/write from an unopened filedes
*/
puts( "attempt to read from an unopened filedes - expect EBADF" );
diff --git a/testsuites/psxtests/psxfile02/init.c b/testsuites/psxtests/psxfile02/init.c
index d66815203a..80e5d86897 100644
--- a/testsuites/psxtests/psxfile02/init.c
+++ b/testsuites/psxtests/psxfile02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <stdio.h>
#include <sys/uio.h>
#include <sys/types.h>
diff --git a/testsuites/psxtests/psxfilelock01/init.c b/testsuites/psxtests/psxfilelock01/init.c
index d64d1a185f..74533174d8 100644
--- a/testsuites/psxtests/psxfilelock01/init.c
+++ b/testsuites/psxtests/psxfilelock01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
#include <errno.h>
diff --git a/testsuites/psxtests/psxgetattrnp01/init.c b/testsuites/psxtests/psxgetattrnp01/init.c
index 19981573d1..33735cc144 100644
--- a/testsuites/psxtests/psxgetattrnp01/init.c
+++ b/testsuites/psxtests/psxgetattrnp01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define _GNU_SOURCE
#include <tmacros.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxgetrusage01/init.c b/testsuites/psxtests/psxgetrusage01/init.c
index 590bc20e77..8723386366 100644
--- a/testsuites/psxtests/psxgetrusage01/init.c
+++ b/testsuites/psxtests/psxgetrusage01/init.c
@@ -19,6 +19,8 @@
extern int getrusage(int who, struct rusage *usage);
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
diff --git a/testsuites/psxtests/psxglobalcon01/init.cc b/testsuites/psxtests/psxglobalcon01/init.cc
index d4855261be..f531410424 100644
--- a/testsuites/psxtests/psxglobalcon01/init.cc
+++ b/testsuites/psxtests/psxglobalcon01/init.cc
@@ -16,6 +16,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
const char rtems_test_name[] = "PSXGLOBALCON 1";
diff --git a/testsuites/psxtests/psxglobalcon02/init.cc b/testsuites/psxtests/psxglobalcon02/init.cc
index c5f09b0d52..44a3c1ab5a 100644
--- a/testsuites/psxtests/psxglobalcon02/init.cc
+++ b/testsuites/psxtests/psxglobalcon02/init.cc
@@ -16,6 +16,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
const char rtems_test_name[] = "PSXGLOBALCON 2";
diff --git a/testsuites/psxtests/psxid01/init.c b/testsuites/psxtests/psxid01/init.c
index 5aa03999df..2ffb84eb10 100644
--- a/testsuites/psxtests/psxid01/init.c
+++ b/testsuites/psxtests/psxid01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
diff --git a/testsuites/psxtests/psximfs01/init.c b/testsuites/psxtests/psximfs01/init.c
index 76bb156daf..380ece7b60 100644
--- a/testsuites/psxtests/psximfs01/init.c
+++ b/testsuites/psxtests/psximfs01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
@@ -70,8 +72,7 @@ void write_helper(void)
printf( "Total written = %zd\n", TotalWritten );
return;
}
- fprintf(
- stderr,
+ printf(
"Unable to create largest IMFS file (error=%s)\n",
strerror(errno)
);
@@ -79,7 +80,7 @@ void write_helper(void)
}
TotalWritten += written;
} while (1);
-
+
}
void read_helper(void)
@@ -93,8 +94,7 @@ void read_helper(void)
sc = read( TestFd, &ch, sizeof(ch) );
if ( sc == 1 ) {
if ( ch != (i%256) ) {
- fprintf(
- stderr,
+ printf(
"MISMATCH 0x%02x != 0x%02x at offset %d\n",
ch,
i % 256,
@@ -104,8 +104,7 @@ void read_helper(void)
}
i++;
} else if ( sc != 0 ) {
- fprintf(
- stderr,
+ printf(
"ERROR - at offset %d - returned %zd and error=%s\n",
i,
sc,
@@ -139,12 +138,11 @@ void truncate_helper(void)
rc = ftruncate( TestFd, new );
if ( rc != 0 ) {
- fprintf(
- stderr,
- "ERROR - at offset %d - returned %d and error=%s\n",
- (int) new,
- rc,
- strerror( errno )
+ printf(
+ "ERROR - at offset %d - returned %d and error=%s\n",
+ (int) new,
+ rc,
+ strerror( errno )
);
}
rtems_test_assert( rc == 0 );
@@ -162,8 +160,8 @@ void extend_helper(int eno)
position = lseek( TestFd, 0, SEEK_END );
printf( "Seek to end .. returned %d\n", (int) position );
- /*
- * test case to ftruncate a file to a length > its size
+ /*
+ * test case to ftruncate a file to a length > its size
*/
rc = ftruncate( TestFd, 2 );
@@ -178,12 +176,11 @@ void extend_helper(int eno)
rc = ftruncate( TestFd, new );
if ( rc != 0 ) {
if( errno != eno ) {
- fprintf(
- stderr,
- "ERROR - at offset %d - returned %d and error=%s\n",
- (int) new,
- rc,
- strerror( errno )
+ printf(
+ "ERROR - at offset %d - returned %d and error=%s\n",
+ (int) new,
+ rc,
+ strerror( errno )
);
break;
}
@@ -239,7 +236,7 @@ rtems_task Init(
open_it(true, false);
read_helper();
close_it();
-
+
open_it(false, false);
truncate_helper();
@@ -250,7 +247,7 @@ rtems_task Init(
extend_helper(ENOSPC);
- /*
+ /*
* free the allocated heap memory
*/
free(alloc_ptr);
diff --git a/testsuites/psxtests/psximfs02/init.c b/testsuites/psxtests/psximfs02/init.c
index 047a4fcff5..07e55c42d9 100644
--- a/testsuites/psxtests/psximfs02/init.c
+++ b/testsuites/psxtests/psximfs02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
diff --git a/testsuites/psxtests/psxintrcritical01/init.c b/testsuites/psxtests/psxintrcritical01/init.c
index a6a64bad60..72686cc9a2 100644
--- a/testsuites/psxtests/psxintrcritical01/init.c
+++ b/testsuites/psxtests/psxintrcritical01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include <intrcritical.h>
#include <time.h>
diff --git a/testsuites/psxtests/psxitimer/init.c b/testsuites/psxtests/psxitimer/init.c
index dc32f34825..915c445dc3 100644
--- a/testsuites/psxtests/psxitimer/init.c
+++ b/testsuites/psxtests/psxitimer/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <sys/time.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxkey01/init.c b/testsuites/psxtests/psxkey01/init.c
index 6b8f57eccc..c1ce6cb269 100644
--- a/testsuites/psxtests/psxkey01/init.c
+++ b/testsuites/psxtests/psxkey01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <errno.h>
diff --git a/testsuites/psxtests/psxkey02/init.c b/testsuites/psxtests/psxkey02/init.c
index 23a392b004..e36c586edb 100644
--- a/testsuites/psxtests/psxkey02/init.c
+++ b/testsuites/psxtests/psxkey02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <errno.h>
#include <rtems/libcsupport.h>
diff --git a/testsuites/psxtests/psxkey03/init.c b/testsuites/psxtests/psxkey03/init.c
index b133e50739..e0c2f7d8d2 100644
--- a/testsuites/psxtests/psxkey03/init.c
+++ b/testsuites/psxtests/psxkey03/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <errno.h>
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxkey04/init.c b/testsuites/psxtests/psxkey04/init.c
index 4dcc342451..2540dd9d7f 100644
--- a/testsuites/psxtests/psxkey04/init.c
+++ b/testsuites/psxtests/psxkey04/init.c
@@ -12,6 +12,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <errno.h>
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxkey05/init.c b/testsuites/psxtests/psxkey05/init.c
index 6ebe49fe01..e848fa337c 100644
--- a/testsuites/psxtests/psxkey05/init.c
+++ b/testsuites/psxtests/psxkey05/init.c
@@ -12,6 +12,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <errno.h>
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxkey06/init.c b/testsuites/psxtests/psxkey06/init.c
index 28236c2adc..fa3f2cfa60 100644
--- a/testsuites/psxtests/psxkey06/init.c
+++ b/testsuites/psxtests/psxkey06/init.c
@@ -12,6 +12,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <errno.h>
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxkey07/init.c b/testsuites/psxtests/psxkey07/init.c
index 91cc7ea4ea..b7616c5101 100644
--- a/testsuites/psxtests/psxkey07/init.c
+++ b/testsuites/psxtests/psxkey07/init.c
@@ -12,6 +12,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <sched.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxkey08/init.c b/testsuites/psxtests/psxkey08/init.c
index 1e6d53a34e..95da493e3d 100644
--- a/testsuites/psxtests/psxkey08/init.c
+++ b/testsuites/psxtests/psxkey08/init.c
@@ -12,6 +12,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
#include <stdio.h>
diff --git a/testsuites/psxtests/psxkey09/init.c b/testsuites/psxtests/psxkey09/init.c
index 2f7e92a741..9e1b494202 100644
--- a/testsuites/psxtests/psxkey09/init.c
+++ b/testsuites/psxtests/psxkey09/init.c
@@ -12,6 +12,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <errno.h>
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxkey10/init.c b/testsuites/psxtests/psxkey10/init.c
index 1c6ebd8c63..1e773e3731 100644
--- a/testsuites/psxtests/psxkey10/init.c
+++ b/testsuites/psxtests/psxkey10/init.c
@@ -12,6 +12,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pthread.h>
#include <errno.h>
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxmmap01/init.c b/testsuites/psxtests/psxmmap01/init.c
index e3e8b9ac60..7efb36ef5e 100644
--- a/testsuites/psxtests/psxmmap01/init.c
+++ b/testsuites/psxtests/psxmmap01/init.c
@@ -30,6 +30,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include "pritime.h"
diff --git a/testsuites/psxtests/psxmount/main.c b/testsuites/psxtests/psxmount/main.c
index a723b87d4a..140057e4dc 100644
--- a/testsuites/psxtests/psxmount/main.c
+++ b/testsuites/psxtests/psxmount/main.c
@@ -4,12 +4,13 @@
* Attempt to mount the IMFS file system on a mount point in the base IMFS
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c
index 3f34d39cef..8cab81628b 100644
--- a/testsuites/psxtests/psxmsgq01/init.c
+++ b/testsuites/psxtests/psxmsgq01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <sched.h>
diff --git a/testsuites/psxtests/psxmsgq02/init.c b/testsuites/psxtests/psxmsgq02/init.c
index 290663d22d..e9f2e92b53 100644
--- a/testsuites/psxtests/psxmsgq02/init.c
+++ b/testsuites/psxtests/psxmsgq02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <errno.h>
diff --git a/testsuites/psxtests/psxmsgq03/init.c b/testsuites/psxtests/psxmsgq03/init.c
index 14644420c8..127bb72c69 100644
--- a/testsuites/psxtests/psxmsgq03/init.c
+++ b/testsuites/psxtests/psxmsgq03/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
diff --git a/testsuites/psxtests/psxmsgq04/init.c b/testsuites/psxtests/psxmsgq04/init.c
index f1e1c968c0..815cb02ff3 100644
--- a/testsuites/psxtests/psxmsgq04/init.c
+++ b/testsuites/psxtests/psxmsgq04/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <unistd.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxmutexattr01/init.c b/testsuites/psxtests/psxmutexattr01/init.c
index 1ea1ab58c0..8ee67745d4 100644
--- a/testsuites/psxtests/psxmutexattr01/init.c
+++ b/testsuites/psxtests/psxmutexattr01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include <errno.h>
#include <pthread.h>
diff --git a/testsuites/psxtests/psxobj01/init.c b/testsuites/psxtests/psxobj01/init.c
index c3b3f49aa0..3a983b57e9 100644
--- a/testsuites/psxtests/psxobj01/init.c
+++ b/testsuites/psxtests/psxobj01/init.c
@@ -16,6 +16,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include <rtems/score/objectimpl.h>
diff --git a/testsuites/psxtests/psxonce01/init.c b/testsuites/psxtests/psxonce01/init.c
index 1c90769d38..9f7f76b95d 100644
--- a/testsuites/psxtests/psxonce01/init.c
+++ b/testsuites/psxtests/psxonce01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
diff --git a/testsuites/psxtests/psxpasswd01/init.c b/testsuites/psxtests/psxpasswd01/init.c
index eb96e280c5..947478bbb1 100644
--- a/testsuites/psxtests/psxpasswd01/init.c
+++ b/testsuites/psxtests/psxpasswd01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
#include <sys/types.h>
diff --git a/testsuites/psxtests/psxpasswd02/init.c b/testsuites/psxtests/psxpasswd02/init.c
index 7090c9430f..f299d1ee54 100644
--- a/testsuites/psxtests/psxpasswd02/init.c
+++ b/testsuites/psxtests/psxpasswd02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
#include <sys/types.h>
diff --git a/testsuites/psxtests/psxpipe01/init.c b/testsuites/psxtests/psxpipe01/init.c
index 7066f6cf52..50ebeef7bb 100644
--- a/testsuites/psxtests/psxpipe01/init.c
+++ b/testsuites/psxtests/psxpipe01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
#include <sys/types.h>
diff --git a/testsuites/psxtests/psxrdwrv/main.c b/testsuites/psxtests/psxrdwrv/main.c
index 32a5fa9fd8..701f99ac37 100644
--- a/testsuites/psxtests/psxrdwrv/main.c
+++ b/testsuites/psxtests/psxrdwrv/main.c
@@ -7,12 +7,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxreaddir/main.c b/testsuites/psxtests/psxreaddir/main.c
index 176d264978..ac421c1065 100644
--- a/testsuites/psxtests/psxreaddir/main.c
+++ b/testsuites/psxtests/psxreaddir/main.c
@@ -2,12 +2,13 @@
* Simple test program -- simplified version of sample test hello.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxrwlock01/main.c b/testsuites/psxtests/psxrwlock01/main.c
index 88190ebb2a..1386ad43e9 100644
--- a/testsuites/psxtests/psxrwlock01/main.c
+++ b/testsuites/psxtests/psxrwlock01/main.c
@@ -7,12 +7,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <rtems/test.h>
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxsem01/init.c b/testsuites/psxtests/psxsem01/init.c
index ae0b390a7c..d4ea8cb374 100644
--- a/testsuites/psxtests/psxsem01/init.c
+++ b/testsuites/psxtests/psxsem01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <sched.h>
#include <semaphore.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxshm01/init.c b/testsuites/psxtests/psxshm01/init.c
index 4636f9a0af..176933354d 100644
--- a/testsuites/psxtests/psxshm01/init.c
+++ b/testsuites/psxtests/psxshm01/init.c
@@ -14,6 +14,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include "pritime.h"
diff --git a/testsuites/psxtests/psxshm02/init.c b/testsuites/psxtests/psxshm02/init.c
index 071f4c4da8..ff356ce529 100644
--- a/testsuites/psxtests/psxshm02/init.c
+++ b/testsuites/psxtests/psxshm02/init.c
@@ -14,6 +14,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include "pritime.h"
diff --git a/testsuites/psxtests/psxsignal01/init.c b/testsuites/psxtests/psxsignal01/init.c
index 511dd2d637..7ce2a7207f 100644
--- a/testsuites/psxtests/psxsignal01/init.c
+++ b/testsuites/psxtests/psxsignal01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <signal.h>
diff --git a/testsuites/psxtests/psxsignal02/init.c b/testsuites/psxtests/psxsignal02/init.c
index 6ae68d6e5b..eda7ef743a 100644
--- a/testsuites/psxtests/psxsignal02/init.c
+++ b/testsuites/psxtests/psxsignal02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <signal.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxsignal03/init.c b/testsuites/psxtests/psxsignal03/init.c
index f3fc26672b..07fd69a1bb 100644
--- a/testsuites/psxtests/psxsignal03/init.c
+++ b/testsuites/psxtests/psxsignal03/init.c
@@ -47,6 +47,8 @@
#error "Test Mode not defined"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <signal.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxsignal05/init.c b/testsuites/psxtests/psxsignal05/init.c
index 0bc8d7f01f..196082e90e 100644
--- a/testsuites/psxtests/psxsignal05/init.c
+++ b/testsuites/psxtests/psxsignal05/init.c
@@ -16,6 +16,8 @@
#define SIGNAL_ONE SIGUSR1
#define SIGNAL_TWO SIGUSR2
+#define TEST_INIT
+
#include <pmacros.h>
#include <signal.h>
#include <errno.h>
diff --git a/testsuites/psxtests/psxsignal06/init.c b/testsuites/psxtests/psxsignal06/init.c
index cb34bb6bc8..20277be204 100644
--- a/testsuites/psxtests/psxsignal06/init.c
+++ b/testsuites/psxtests/psxsignal06/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
#include <pthread.h>
diff --git a/testsuites/psxtests/psxspin01/main.c b/testsuites/psxtests/psxspin01/main.c
index 4c3bc27fc5..e6462101cd 100644
--- a/testsuites/psxtests/psxspin01/main.c
+++ b/testsuites/psxtests/psxspin01/main.c
@@ -13,12 +13,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxstack01/init.c b/testsuites/psxtests/psxstack01/init.c
index 7a010c8c6c..be3617a702 100644
--- a/testsuites/psxtests/psxstack01/init.c
+++ b/testsuites/psxtests/psxstack01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <errno.h>
#include <pthread.h>
diff --git a/testsuites/psxtests/psxstack02/init.c b/testsuites/psxtests/psxstack02/init.c
index df65ee3393..43fca98411 100644
--- a/testsuites/psxtests/psxstack02/init.c
+++ b/testsuites/psxtests/psxstack02/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
diff --git a/testsuites/psxtests/psxstat/main.c b/testsuites/psxtests/psxstat/main.c
index 07fde7f9b5..14a4b423ae 100644
--- a/testsuites/psxtests/psxstat/main.c
+++ b/testsuites/psxtests/psxstat/main.c
@@ -7,12 +7,13 @@
* http://www.rtems.org/license/LICENSE.
*/
-#define CONFIGURE_INIT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#define TEST_INIT
+
#include <bsp.h>
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxstrsignal01/init.c b/testsuites/psxtests/psxstrsignal01/init.c
index 9614fb99aa..8f3129f04d 100644
--- a/testsuites/psxtests/psxstrsignal01/init.c
+++ b/testsuites/psxtests/psxstrsignal01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include "tmacros.h"
#include <signal.h>
#include <string.h>
diff --git a/testsuites/psxtests/psxsysconf/init.c b/testsuites/psxtests/psxsysconf/init.c
index 2dd9018722..d95fdd3710 100644
--- a/testsuites/psxtests/psxsysconf/init.c
+++ b/testsuites/psxtests/psxsysconf/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxthreadname01/init.c b/testsuites/psxtests/psxthreadname01/init.c
index 16fdec6958..2af3ba7e64 100644
--- a/testsuites/psxtests/psxthreadname01/init.c
+++ b/testsuites/psxtests/psxthreadname01/init.c
@@ -16,6 +16,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define _GNU_SOURCE
#include <errno.h>
#include <pthread.h>
diff --git a/testsuites/psxtests/psxtime/main.c b/testsuites/psxtests/psxtime/main.c
index 7280e8f0af..a1653ffa2c 100644
--- a/testsuites/psxtests/psxtime/main.c
+++ b/testsuites/psxtests/psxtime/main.c
@@ -13,7 +13,8 @@
#include "config.h"
#endif
-#define CONFIGURE_INIT
+
+#define TEST_INIT
#include <bsp.h>
#include <tmacros.h> /* instantiate buffering code if needed */
diff --git a/testsuites/psxtests/psxtimer01/psxtimer.c b/testsuites/psxtests/psxtimer01/psxtimer.c
index 032e9f8e6c..d869374d0c 100644
--- a/testsuites/psxtests/psxtimer01/psxtimer.c
+++ b/testsuites/psxtests/psxtimer01/psxtimer.c
@@ -24,6 +24,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <pthread.h> /* thread facilities */
diff --git a/testsuites/psxtests/psxtimer02/psxtimer.c b/testsuites/psxtests/psxtimer02/psxtimer.c
index e4d6d7d332..59f1697149 100644
--- a/testsuites/psxtests/psxtimer02/psxtimer.c
+++ b/testsuites/psxtests/psxtimer02/psxtimer.c
@@ -24,6 +24,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include "tmacros.h"
diff --git a/testsuites/psxtests/psxtimes01/init.c b/testsuites/psxtests/psxtimes01/init.c
index 30cecd427a..e6150b076e 100644
--- a/testsuites/psxtests/psxtimes01/init.c
+++ b/testsuites/psxtests/psxtimes01/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <tmacros.h>
#include "test_support.h"
#include <sys/times.h>
diff --git a/testsuites/psxtests/psxualarm/init.c b/testsuites/psxtests/psxualarm/init.c
index 7a4fb21b99..a5ba5bf270 100644
--- a/testsuites/psxtests/psxualarm/init.c
+++ b/testsuites/psxtests/psxualarm/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#define CONFIGURE_INIT
#include "system.h"
#include <signal.h>
diff --git a/testsuites/psxtests/psxusleep/init.c b/testsuites/psxtests/psxusleep/init.c
index 383943e1fe..d9d0e71f4a 100644
--- a/testsuites/psxtests/psxusleep/init.c
+++ b/testsuites/psxtests/psxusleep/init.c
@@ -11,6 +11,8 @@
#include "config.h"
#endif
+#define TEST_INIT
+
#include <pmacros.h>
#include <time.h>
#include <errno.h>