[rtems commit] tests: Use printf() instead of fprintf()

Sebastian Huber sebh at rtems.org
Thu Nov 2 13:26:44 UTC 2017


Module:    rtems
Branch:    master
Commit:    8c1f4064ad668c6bab0fb106386e9e2d33d06d31
Changeset: http://git.rtems.org/rtems/commit/?id=8c1f4064ad668c6bab0fb106386e9e2d33d06d31

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov  2 13:56:12 2017 +0100

tests: Use printf() instead of fprintf()

Update #3170.
Update #3199.

---

 testsuites/benchmarks/dhrystone/init.c      |   1 +
 testsuites/benchmarks/linpack/init.c        |   1 +
 testsuites/benchmarks/linpack/linpack-pc.c  |   5 +
 testsuites/benchmarks/whetstone/init.c      |   1 +
 testsuites/benchmarks/whetstone/whetstone.c |   4 +
 testsuites/libtests/block06/init.c          |   4 +-
 testsuites/libtests/capture01/test1.c       |  38 +++----
 testsuites/libtests/complex/docomplex.h     |  44 ++++----
 testsuites/libtests/math/domath.h           | 162 ++++++++++++++--------------
 testsuites/samples/capture/test1.c          |  38 +++----
 testsuites/sptests/sp35/priinv.c            |   3 -
 11 files changed, 143 insertions(+), 158 deletions(-)

diff --git a/testsuites/benchmarks/dhrystone/init.c b/testsuites/benchmarks/dhrystone/init.c
index 3e6245c..44c3f27 100644
--- a/testsuites/benchmarks/dhrystone/init.c
+++ b/testsuites/benchmarks/dhrystone/init.c
@@ -32,6 +32,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
+  rtems_print_printer_fprintf_putc(&rtems_test_printer);
   main(2, argv);
 
   TEST_END();
diff --git a/testsuites/benchmarks/linpack/init.c b/testsuites/benchmarks/linpack/init.c
index c94314b..de5a614 100644
--- a/testsuites/benchmarks/linpack/init.c
+++ b/testsuites/benchmarks/linpack/init.c
@@ -32,6 +32,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
+  rtems_print_printer_fprintf_putc(&rtems_test_printer);
   main(2, argv);
 
   TEST_END();
diff --git a/testsuites/benchmarks/linpack/linpack-pc.c b/testsuites/benchmarks/linpack/linpack-pc.c
index f85e677..1fef18e 100644
--- a/testsuites/benchmarks/linpack/linpack-pc.c
+++ b/testsuites/benchmarks/linpack/linpack-pc.c
@@ -223,6 +223,11 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
+#ifdef __rtems__
+#include <tmacros.h>
+#undef print_time
+#define fprintf(f, ...) rtems_printf(&rtems_test_printer, __VA_ARGS__)
+#endif /* __rtems__ */
 
 
 static REAL atime[9][15];
diff --git a/testsuites/benchmarks/whetstone/init.c b/testsuites/benchmarks/whetstone/init.c
index b166118..2f9a340 100644
--- a/testsuites/benchmarks/whetstone/init.c
+++ b/testsuites/benchmarks/whetstone/init.c
@@ -32,6 +32,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
+  rtems_print_printer_fprintf_putc(&rtems_test_printer);
   main(2, argv);
 
   TEST_END();
diff --git a/testsuites/benchmarks/whetstone/whetstone.c b/testsuites/benchmarks/whetstone/whetstone.c
index aa41353..e0a93aa 100644
--- a/testsuites/benchmarks/whetstone/whetstone.c
+++ b/testsuites/benchmarks/whetstone/whetstone.c
@@ -56,6 +56,10 @@ C**********************************************************************
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
+#ifdef __rtems__
+#include <tmacros.h>
+#define fprintf(f, ...) rtems_printf(&rtems_test_printer, __VA_ARGS__)
+#endif /* __rtems__ */
 
 /* the following is optional depending on the timing function used */
 #include <sys/time.h>
diff --git a/testsuites/libtests/block06/init.c b/testsuites/libtests/block06/init.c
index 1f91f45..f564fb8 100644
--- a/testsuites/libtests/block06/init.c
+++ b/testsuites/libtests/block06/init.c
@@ -138,9 +138,9 @@ static bool
 bdbuf_test_print_sc (rtems_status_code sc, bool newline)
 {
   if (newline)
-    fprintf (stdout, "%s\n", rtems_status_text (sc));
+    printf ("%s\n", rtems_status_text (sc));
   else
-    fprintf (stdout, "%s", rtems_status_text (sc));
+    printf ("%s", rtems_status_text (sc));
   return sc == RTEMS_SUCCESSFUL;
 }
 
diff --git a/testsuites/libtests/capture01/test1.c b/testsuites/libtests/capture01/test1.c
index 5e334fc..48d08c4 100644
--- a/testsuites/libtests/capture01/test1.c
+++ b/testsuites/libtests/capture01/test1.c
@@ -55,16 +55,14 @@ capture_CT1a (rtems_task_argument arg)
   sc = rtems_semaphore_obtain (mutex, RTEMS_WAIT, 0);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1a: mutex obtain: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1a: mutex obtain: %s\n", rtems_status_text (sc));
 
   capture_wait (2500);
 
   sc = rtems_semaphore_release (mutex);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1a: mutex release: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1a: mutex release: %s\n", rtems_status_text (sc));
 
   capture_CT1a_deleted = 1;
 
@@ -93,16 +91,14 @@ capture_CT1c (rtems_task_argument arg)
   sc = rtems_semaphore_obtain (mutex, RTEMS_WAIT, 0);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1c: mutex obtain: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1c: mutex obtain: %s\n", rtems_status_text (sc));
 
   capture_wait (500);
 
   sc = rtems_semaphore_release (mutex);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1c: mutex release: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1c: mutex release: %s\n", rtems_status_text (sc));
 
   capture_CT1c_deleted = 1;
 
@@ -130,8 +126,7 @@ void capture_test_1 ()
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot mutex: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot mutex: %s\n", rtems_status_text (sc));
     return;
   }
 
@@ -144,8 +139,7 @@ void capture_test_1 ()
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot create CT1a: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot create CT1a: %s\n", rtems_status_text (sc));
     rtems_semaphore_delete (mutex);
     return;
   }
@@ -154,8 +148,7 @@ void capture_test_1 ()
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot start CT1a: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot start CT1a: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
     return;
@@ -172,8 +165,7 @@ void capture_test_1 ()
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot create CT1b: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot create CT1b: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
     return;
@@ -183,8 +175,7 @@ void capture_test_1 ()
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot start CT1b: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot start CT1b: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
@@ -202,8 +193,7 @@ void capture_test_1 ()
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot create CT1c: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot create CT1c: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
@@ -214,8 +204,7 @@ void capture_test_1 ()
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot start CT1c: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot start CT1c: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[2]);
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
@@ -234,7 +223,7 @@ void capture_test_1 ()
 
   if (!loops)
   {
-    fprintf (stdout, "error: Test 1: test tasks did not delete\n");
+    printf ("error: Test 1: test tasks did not delete\n");
     rtems_task_delete (id[2]);
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
@@ -242,8 +231,7 @@ void capture_test_1 ()
 
   sc = rtems_semaphore_delete (mutex);
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: Test 1: deleting the mutex: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: deleting the mutex: %s\n", rtems_status_text (sc));
 
 }
 
diff --git a/testsuites/libtests/complex/docomplex.h b/testsuites/libtests/complex/docomplex.h
index 440b9ac..ac8377d 100644
--- a/testsuites/libtests/complex/docomplex.h
+++ b/testsuites/libtests/complex/docomplex.h
@@ -38,87 +38,87 @@ FUNC(docomplex) (void)
   cb = 1.0 - 1.0 * I;
 
   f1 = FUNC(cabs) (ca);
-  fprintf (stdout, STR(cabs) "  : " PRI "\n", f1);
+  printf (STR(cabs) "  : " PRI "\n", f1);
 
   cc = FUNC(cacos) (ca);
-  fprintf (stdout, STR(cacos) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(cacos) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(cacosh) (ca);
-  fprintf (stdout, STR(cacosh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(cacosh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   f1 = FUNC(carg) (ca);
-  fprintf (stdout, STR(carg) "  : " PRI "\n", f1);
+  printf (STR(carg) "  : " PRI "\n", f1);
 
   cc = FUNC(casin) (ca);
-  fprintf (stdout, STR(casin) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(casin) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(casinh) (ca);
-  fprintf (stdout, STR(casinh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(casinh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(catan) (ca);
-  fprintf (stdout, STR(catan) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(catan) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(catanh) (ca);
-  fprintf (stdout, STR(catanh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(catanh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(ccos) (ca);
-  fprintf (stdout, STR(ccos) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(ccos) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(ccosh) (ca);
-  fprintf (stdout, STR(ccosh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(ccosh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(cexp) (ca);
-  fprintf (stdout, STR(cexp) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(cexp) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   f1 = FUNC(cimag) (ca);
-  fprintf (stdout, STR(cimag) " : " PRI "\n", f1);
+  printf (STR(cimag) " : " PRI "\n", f1);
 
   cc = FUNC(clog) (ca);
-  fprintf (stdout, STR(clog) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(clog) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(conj) (ca);
-  fprintf (stdout, STR(conj) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(conj) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(cpow) (ca, cb);
-  fprintf (stdout, STR(cpow) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(cpow) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(cproj) (ca);
-  fprintf (stdout, STR(cproj) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(cproj) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   f1 = FUNC(creal) (ca);
-  fprintf (stdout, STR(creal) " : " PRI "\n", f1);
+  printf (STR(creal) " : " PRI "\n", f1);
 
   cc = FUNC(csin) (ca);
-  fprintf (stdout, STR(csin) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(csin) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(csinh) (ca);
-  fprintf (stdout, STR(csinh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(csinh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(csqrt) (ca);
-  fprintf (stdout, STR(csqrt) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(csqrt) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(ctan) (ca);
-  fprintf (stdout, STR(ctan) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(ctan) "  : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 
   cc = FUNC(ctanh) (ca);
-  fprintf (stdout, STR(ctanh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+  printf (STR(ctanh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
 	   FUNC(cimag) (cc));
 #endif
 }
diff --git a/testsuites/libtests/math/domath.h b/testsuites/libtests/math/domath.h
index 1f841fb..fdec8e5 100644
--- a/testsuites/libtests/math/domath.h
+++ b/testsuites/libtests/math/domath.h
@@ -52,354 +52,354 @@ FUNC(domath) (void)
 
   fa = 0.0;
   f1 = FUNC(acos) (fa);
-  fprintf( stdout, STR(acos) "          : " PRI "\n", f1);
+  printf( STR(acos) "          : " PRI "\n", f1);
 
   fa = 0.0;
   f1 = FUNC(acosh) (fa);
-  fprintf( stdout, STR(acosh) "         : " PRI "\n", f1);
+  printf( STR(acosh) "         : " PRI "\n", f1);
 
   fa = 1.0;
   f1 = FUNC(asin) (fa);
-  fprintf( stdout, STR(asin) "          : " PRI "\n", f1);
+  printf( STR(asin) "          : " PRI "\n", f1);
 
   fa = 1.0;
   f1 = FUNC(asinh) (fa);
-  fprintf( stdout, STR(asinh) "         : " PRI "\n", f1);
+  printf( STR(asinh) "         : " PRI "\n", f1);
 
   fa = M_PI_4;
   f1 = FUNC(atan) (fa);
-  fprintf( stdout, STR(atan) "          : " PRI "\n", f1);
+  printf( STR(atan) "          : " PRI "\n", f1);
 
   fa = 2.3;
   fb = 2.3;
   f1 = FUNC(atan2) (fa, fb);
-  fprintf( stdout, STR(atan2) "         : " PRI "\n", f1);
+  printf( STR(atan2) "         : " PRI "\n", f1);
 
   fa = 1.0;
   f1 = FUNC(atanh) (fa);
-  fprintf( stdout, STR(atanh) "         : " PRI "\n", f1);
+  printf( STR(atanh) "         : " PRI "\n", f1);
 
   fa = 27.0;
   f1 = FUNC(cbrt) (fa);
-  fprintf( stdout, STR(cbrt) "          : " PRI "\n", f1);
+  printf( STR(cbrt) "          : " PRI "\n", f1);
 
   fa = 3.5;
   f1 = FUNC(ceil) (fa);
-  fprintf( stdout, STR(ceil) "          : " PRI "\n", f1);
+  printf( STR(ceil) "          : " PRI "\n", f1);
 
   fa = 3.5;
   fb = -2.5;
   f1 = FUNC(copysign) (fa, fb);
-  fprintf( stdout, STR(copysign) "      : " PRI "\n", f1);
+  printf( STR(copysign) "      : " PRI "\n", f1);
 
   fa = M_PI_2;
   f1 = FUNC(cos) (fa);
-  fprintf( stdout, STR(cos) "           : " PRI "\n", f1);
+  printf( STR(cos) "           : " PRI "\n", f1);
 
   fa = M_PI_2;
   f1 = FUNC(cosh) (fa);
-  fprintf( stdout, STR(cosh) "          : " PRI "\n", f1);
+  printf( STR(cosh) "          : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(erf) (fa);
-  fprintf( stdout, STR(erf) "           : " PRI "\n", f1);
+  printf( STR(erf) "           : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(erfc) (fa);
-  fprintf( stdout, STR(erfc) "          : " PRI "\n", f1);
+  printf( STR(erfc) "          : " PRI "\n", f1);
 
   fa = 0.42;
   f1 = FUNC(exp) (fa);
-  fprintf( stdout, STR(exp) "           : " PRI "\n", f1);
+  printf( STR(exp) "           : " PRI "\n", f1);
 
   fa = 0.42;
   f1 = FUNC(exp2) (fa);
-  fprintf( stdout, STR(exp2) "          : " PRI "\n", f1);
+  printf( STR(exp2) "          : " PRI "\n", f1);
 
   fa = 0.00042;
   f1 = FUNC(expm1) (fa);
-  fprintf( stdout, STR(expm1) "         : " PRI "\n", f1);
+  printf( STR(expm1) "         : " PRI "\n", f1);
 
   fa = -1.123;
   f1 = FUNC(fabs) (fa);
-  fprintf( stdout, STR(fabs) "          : " PRI "\n", f1);
+  printf( STR(fabs) "          : " PRI "\n", f1);
 
   fa = 1.123;
   fb = 1.123;
   f1 = FUNC(fdim) (fa, fb);
-  fprintf( stdout, STR(fdim) "          : " PRI "\n", f1);
+  printf( STR(fdim) "          : " PRI "\n", f1);
 
   fa = 0.5;
   f1 = FUNC(floor) (fa);
-  fprintf( stdout, STR(floor) "         : " PRI "\n", f1);
+  printf( STR(floor) "         : " PRI "\n", f1);
   fa = -0.5;
   f1 = FUNC(floor) (fa);
-  fprintf( stdout, STR(floor) "         : " PRI "\n", f1);
+  printf( STR(floor) "         : " PRI "\n", f1);
 
   fa = 2.1;
   fb = 2.2;
   fc = 3.01;
   f1 = FUNC(fma) (fa, fb, fc);
-  fprintf( stdout, STR(fma) "           : " PRI "\n", f1);
+  printf( STR(fma) "           : " PRI "\n", f1);
 
   fa = -0.42;
   fb = 0.42;
   f1 = FUNC(fmax) (fa, fb);
-  fprintf( stdout, STR(fmax) "          : " PRI "\n", f1);
+  printf( STR(fmax) "          : " PRI "\n", f1);
 
   fa = -0.42;
   fb = 0.42;
   f1 = FUNC(fmin) (fa, fb);
-  fprintf( stdout, STR(fmin) "          : " PRI "\n", f1);
+  printf( STR(fmin) "          : " PRI "\n", f1);
 
   fa = 42.0;
   fb = 3.0;
   f1 = FUNC(fmod) (fa, fb);
-  fprintf( stdout, STR(fmod) "          : " PRI "\n", f1);
+  printf( STR(fmod) "          : " PRI "\n", f1);
 
   /* no type-specific variant */
   fa = 1.0;
   i1 = fpclassify(fa);
-  fprintf( stdout, "fpclassify     : %d\n", i1);
+  printf( "fpclassify     : %d\n", i1);
 
   fa = 42.0;
   f1 = FUNC(frexp) (fa, &i1);
-  fprintf( stdout, STR(frexp) "         : " PRI "\n", f1);
+  printf( STR(frexp) "         : " PRI "\n", f1);
 
   fa = 42.0;
   fb = 42.0;
   f1 = FUNC(hypot) (fa, fb);
-  fprintf( stdout, STR(hypot) "         : " PRI "\n", f1);
+  printf( STR(hypot) "         : " PRI "\n", f1);
 
   fa = 42.0;
   i1 = FUNC(ilogb) (fa);
-  fprintf( stdout, STR(ilogb) "         : %d\n", i1);
+  printf( STR(ilogb) "         : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   i1 = isfinite(fa);
-  fprintf( stdout, "isfinite       : %d\n", i1);
+  printf( "isfinite       : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   fb = 3.1;
   i1 = isgreater(fa, fb);
-  fprintf( stdout, "isgreater      : %d\n", i1);
+  printf( "isgreater      : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   fb = 3.1;
   i1 = isgreaterequal(fa, fb);
-  fprintf( stdout, "isgreaterequal : %d\n", i1);
+  printf( "isgreaterequal : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   i1 = isinf(fa);
-  fprintf( stdout, "isinf          : %d\n", i1);
+  printf( "isinf          : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   fb = 3.1;
   i1 = isless(fa, fb);
-  fprintf( stdout, "isless         : %d\n", i1);
+  printf( "isless         : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   fb = 3.1;
   i1 = islessequal(fa, fb);
-  fprintf( stdout, "islessequal    : %d\n", i1);
+  printf( "islessequal    : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   fb = 3.1;
   i1 = islessgreater(fa, fb);
-  fprintf( stdout, "islessgreater  : %d\n", i1);
+  printf( "islessgreater  : %d\n", i1);
 
   /* no type-specific variant */
   fa = 0.0;
   i1 = isnan(fa);
-  fprintf( stdout, "isnan          : %d\n", i1);
+  printf( "isnan          : %d\n", i1);
 
   /* no type-specific variant */
   fa = 3.0;
   i1 = isnormal(fa);
-  fprintf( stdout, "isnormal       : %d\n", i1);
+  printf( "isnormal       : %d\n", i1);
 
   /* no type-specific variant */
   fa = 1.0;
   fb = 2.0;
   f1 = isunordered(fa, fb);
-  fprintf( stdout, "isunordered    : %d\n", i1);
+  printf( "isunordered    : %d\n", i1);
 
   fa = 1.2;
   f1 = FUNC(j0) (fa);
-  fprintf( stdout, STR(j0) "            : " PRI "\n", f1);
+  printf( STR(j0) "            : " PRI "\n", f1);
 
   fa = 1.2;
   f1 = FUNC(j1) (fa);
-  fprintf( stdout, STR(j1) "            : " PRI "\n", f1);
+  printf( STR(j1) "            : " PRI "\n", f1);
 
   ia = 2;
   fa = 1.2;
   f1 = FUNC(jn) (ia, fa);
-  fprintf( stdout, STR(jn) "            : " PRI "\n", f1);
+  printf( STR(jn) "            : " PRI "\n", f1);
 
   fa = 1.2;
   ia = 3;
   f1 = FUNC(ldexp) (fa, ia);
-  fprintf( stdout, STR(ldexp) "         : " PRI "\n", f1);
+  printf( STR(ldexp) "         : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(lgamma) (fa);
-  fprintf( stdout, STR(lgamma) "        : " PRI "\n", f1);
+  printf( STR(lgamma) "        : " PRI "\n", f1);
 
   fa = -0.5;
   f1 = FUNC(llrint) (fa);
-  fprintf( stdout, STR(llrint) "        : " PRI "\n", f1);
+  printf( STR(llrint) "        : " PRI "\n", f1);
   fa = 0.5;
   f1 = FUNC(llrint) (fa);
-  fprintf( stdout, STR(llrint) "        : " PRI "\n", f1);
+  printf( STR(llrint) "        : " PRI "\n", f1);
 
   fa = -0.5;
   f1 = FUNC(llround) (fa);
-  fprintf( stdout, STR(lround) "        : " PRI "\n", f1);
+  printf( STR(lround) "        : " PRI "\n", f1);
   fa = 0.5;
   f1 = FUNC(llround) (fa);
-  fprintf( stdout, STR(lround) "        : " PRI "\n", f1);
+  printf( STR(lround) "        : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(log) (fa);
-  fprintf( stdout, STR(log) "           : " PRI "\n", f1);
+  printf( STR(log) "           : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(log10) (fa);
-  fprintf( stdout, STR(log10) "         : " PRI "\n", f1);
+  printf( STR(log10) "         : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(log1p) (fa);
-  fprintf( stdout, STR(log1p) "         : " PRI "\n", f1);
+  printf( STR(log1p) "         : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(log2) (fa);
-  fprintf( stdout, STR(log2) "          : " PRI "\n", f1);
+  printf( STR(log2) "          : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(logb) (fa);
-  fprintf( stdout, STR(logb) "          : " PRI "\n", f1);
+  printf( STR(logb) "          : " PRI "\n", f1);
 
   fa = -0.5;
   f1 = FUNC(lrint) (fa);
-  fprintf( stdout, STR(lrint) "         : " PRI "\n", f1);
+  printf( STR(lrint) "         : " PRI "\n", f1);
   fa = 0.5;
   f1 = FUNC(lrint) (fa);
-  fprintf( stdout, STR(lrint) "         : " PRI "\n", f1);
+  printf( STR(lrint) "         : " PRI "\n", f1);
 
   fa = -0.5;
   f1 = FUNC(lround) (fa);
-  fprintf( stdout, STR(lround) "        : " PRI "\n", f1);
+  printf( STR(lround) "        : " PRI "\n", f1);
   fa = 0.5;
   f1 = FUNC(lround) (fa);
-  fprintf( stdout, STR(lround) "        : " PRI "\n", f1);
+  printf( STR(lround) "        : " PRI "\n", f1);
 
   fa = 42.0;
   f1 = FUNC(modf) (fa, &f2);
-  fprintf( stdout, STR(lmodf) "         : " PRI "\n", f1);
+  printf( STR(lmodf) "         : " PRI "\n", f1);
 
   f1 = FUNC(nan) ("");
-  fprintf( stdout, STR(nan) "           : " PRI "\n", f1);
+  printf( STR(nan) "           : " PRI "\n", f1);
 
   fa = 1.5;
   f1 = FUNC(nearbyint) (fa);
-  fprintf( stdout, STR(nearbyint) "     : " PRI "\n", f1);
+  printf( STR(nearbyint) "     : " PRI "\n", f1);
 
   fa = 1.5;
   fb = 2.0;
   f1 = FUNC(nextafter) (fa, fb);
-  fprintf( stdout, STR(nextafter) "     : " PRI "\n", f1);
+  printf( STR(nextafter) "     : " PRI "\n", f1);
 
   fa = 3.01;
   fb = 2.0;
   f1 = FUNC(pow) (fa, fb);
-  fprintf( stdout, STR(pow) "           : " PRI "\n", f1);
+  printf( STR(pow) "           : " PRI "\n", f1);
 
   fa = 3.01;
   fb = 2.0;
   f1 = FUNC(remainder) (fa, fb);
-  fprintf( stdout, STR(remainder) "     : " PRI "\n", f1);
+  printf( STR(remainder) "     : " PRI "\n", f1);
 
   fa = 29.0;
   fb = 3.0;
   f1 = FUNC(remquo) (fa, fb, &i1);
-  fprintf( stdout, STR(remquo) "        : " PRI "\n", f1);
+  printf( STR(remquo) "        : " PRI "\n", f1);
 
   fa = 0.5;
   f1 = FUNC(rint) (fa);
-  fprintf( stdout, STR(rint) "          : " PRI "\n", f1);
+  printf( STR(rint) "          : " PRI "\n", f1);
   fa = -0.5;
   f1 = FUNC(rint) (fa);
-  fprintf( stdout, STR(rint) "          : " PRI "\n", f1);
+  printf( STR(rint) "          : " PRI "\n", f1);
 
   fa = 0.5;
   f1 = FUNC(round) (fa);
-  fprintf( stdout, STR(round) "         : " PRI "\n", f1);
+  printf( STR(round) "         : " PRI "\n", f1);
   fa = -0.5;
   f1 = FUNC(round) (fa);
-  fprintf( stdout, STR(round) "         : " PRI "\n", f1);
+  printf( STR(round) "         : " PRI "\n", f1);
 
   fa = 1.2;
   ia = 3;
   f1 = FUNC(scalbln) (fa, ia);
-  fprintf( stdout, STR(scalbln) "       : " PRI "\n", f1);
+  printf( STR(scalbln) "       : " PRI "\n", f1);
 
   fa = 1.2;
   ia = 3;
   f1 = FUNC(scalbn) (fa, ia);
-  fprintf( stdout, STR(scalbn) "        : " PRI "\n", f1);
+  printf( STR(scalbn) "        : " PRI "\n", f1);
 
   /* no type-specific variant */
   fa = 1.0;
   i1 = signbit(fa);
-  fprintf( stdout, "signbit        : %i\n", i1);
+  printf( "signbit        : %i\n", i1);
 
   fa = M_PI_4;
   f1 = FUNC(sin) (fa);
-  fprintf( stdout, STR(sin) "           : " PRI "\n", f1);
+  printf( STR(sin) "           : " PRI "\n", f1);
 
   fa = M_PI_4;
   f1 = FUNC(sinh) (fa);
-  fprintf( stdout, STR(sinh) "          : " PRI "\n", f1);
+  printf( STR(sinh) "          : " PRI "\n", f1);
 
   fa = 9.0;
   f1 = FUNC(sqrt) (fa);
-  fprintf( stdout, STR(sqrt) "          : " PRI "\n", f1);
+  printf( STR(sqrt) "          : " PRI "\n", f1);
 
   fa = M_PI_4;
   f1 = FUNC(tan) (fa);
-  fprintf( stdout, STR(tan) "           : " PRI "\n", f1);
+  printf( STR(tan) "           : " PRI "\n", f1);
 
   fa = M_PI_4;
   f1 = FUNC(tanh) (fa);
-  fprintf( stdout, STR(tanh) "          : " PRI "\n", f1);
+  printf( STR(tanh) "          : " PRI "\n", f1);
 
   fa = 2.1;
   f1 = FUNC(tgamma) (fa);
-  fprintf( stdout, STR(tgamma) "        : " PRI "\n", f1);
+  printf( STR(tgamma) "        : " PRI "\n", f1);
 
   fa = 3.5;
   f1 = FUNC(trunc) (fa);
-  fprintf( stdout, STR(trunc) "         : " PRI "\n", f1);
+  printf( STR(trunc) "         : " PRI "\n", f1);
 
   fa = 1.2;
   f1 = FUNC(y0) (fa);
-  fprintf( stdout, STR(y0) "            : " PRI "\n", f1);
+  printf( STR(y0) "            : " PRI "\n", f1);
 
   fa = 1.2;
   f1 = FUNC(y1) (fa);
-  fprintf( stdout, STR(y1) "            : " PRI "\n", f1);
+  printf( STR(y1) "            : " PRI "\n", f1);
 
   ia = 3;
   fa = 1.2;
   f1 = FUNC(yn) (ia, fa);
-  fprintf( stdout, STR(yn) "            : " PRI "\n", f1);
+  printf( STR(yn) "            : " PRI "\n", f1);
 #endif
 }
diff --git a/testsuites/samples/capture/test1.c b/testsuites/samples/capture/test1.c
index eeb85b5..19b7b4f 100644
--- a/testsuites/samples/capture/test1.c
+++ b/testsuites/samples/capture/test1.c
@@ -55,16 +55,14 @@ capture_CT1a (rtems_task_argument arg)
   sc = rtems_semaphore_obtain (mutex, RTEMS_WAIT, 0);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1a: mutex obtain: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1a: mutex obtain: %s\n", rtems_status_text (sc));
 
   capture_wait (2500);
 
   sc = rtems_semaphore_release (mutex);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1a: mutex release: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1a: mutex release: %s\n", rtems_status_text (sc));
 
   capture_CT1a_deleted = 1;
 
@@ -93,16 +91,14 @@ capture_CT1c (rtems_task_argument arg)
   sc = rtems_semaphore_obtain (mutex, RTEMS_WAIT, 0);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1c: mutex obtain: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1c: mutex obtain: %s\n", rtems_status_text (sc));
 
   capture_wait (500);
 
   sc = rtems_semaphore_release (mutex);
 
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: CT1c: mutex release: %s\n",
-             rtems_status_text (sc));
+    printf ("error: CT1c: mutex release: %s\n", rtems_status_text (sc));
 
   capture_CT1c_deleted = 1;
 
@@ -134,8 +130,7 @@ capture_test_1 (int                                argc,
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot mutex: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot mutex: %s\n", rtems_status_text (sc));
     return;
   }
 
@@ -148,8 +143,7 @@ capture_test_1 (int                                argc,
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot create CT1a: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot create CT1a: %s\n", rtems_status_text (sc));
     rtems_semaphore_delete (mutex);
     return;
   }
@@ -158,8 +152,7 @@ capture_test_1 (int                                argc,
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot start CT1a: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot start CT1a: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
     return;
@@ -176,8 +169,7 @@ capture_test_1 (int                                argc,
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot create CT1b: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot create CT1b: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
     return;
@@ -187,8 +179,7 @@ capture_test_1 (int                                argc,
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot start CT1b: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot start CT1b: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
@@ -206,8 +197,7 @@ capture_test_1 (int                                argc,
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot create CT1c: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot create CT1c: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
     rtems_semaphore_delete (mutex);
@@ -218,8 +208,7 @@ capture_test_1 (int                                argc,
 
   if (sc != RTEMS_SUCCESSFUL)
   {
-    fprintf (stdout, "error: Test 1: cannot start CT1c: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: cannot start CT1c: %s\n", rtems_status_text (sc));
     rtems_task_delete (id[2]);
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
@@ -238,7 +227,7 @@ capture_test_1 (int                                argc,
 
   if (!loops)
   {
-    fprintf (stdout, "error: Test 1: test tasks did not delete\n");
+    printf ("error: Test 1: test tasks did not delete\n");
     rtems_task_delete (id[2]);
     rtems_task_delete (id[1]);
     rtems_task_delete (id[0]);
@@ -246,8 +235,7 @@ capture_test_1 (int                                argc,
 
   sc = rtems_semaphore_delete (mutex);
   if (sc != RTEMS_SUCCESSFUL)
-    fprintf (stdout, "error: Test 1: deleting the mutex: %s\n",
-             rtems_status_text (sc));
+    printf ("error: Test 1: deleting the mutex: %s\n", rtems_status_text (sc));
 }
 
 static rtems_monitor_command_entry_t capture_cmds[] =
diff --git a/testsuites/sptests/sp35/priinv.c b/testsuites/sptests/sp35/priinv.c
index a6d252a..f604dbb 100644
--- a/testsuites/sptests/sp35/priinv.c
+++ b/testsuites/sptests/sp35/priinv.c
@@ -204,9 +204,6 @@ rtems_task LocalHwSim_Exec(rtems_task_argument TaskArg)
       rtems_task_wake_after(100);
 
       StartHw = FALSE;
-#if 0
-      fprintf( stderr, "StartHw -- fire ISR (%d)\n", ++ISRCount );
-#endif
 #if defined(TEST_USE_ISR)
       __asm__ volatile ("ta 5");
       __asm__ volatile ("nop");



More information about the vc mailing list