From 8c1f4064ad668c6bab0fb106386e9e2d33d06d31 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 2 Nov 2017 13:56:12 +0100 Subject: tests: Use printf() instead of fprintf() Update #3170. Update #3199. --- testsuites/samples/capture/test1.c | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'testsuites/samples/capture/test1.c') diff --git a/testsuites/samples/capture/test1.c b/testsuites/samples/capture/test1.c index eeb85b552a..19b7b4fad8 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[] = -- cgit v1.2.3