[rtems commit] smptests: Fix format warnings
Sebastian Huber
sebh at rtems.org
Tue Jul 24 12:37:15 UTC 2018
Module: rtems
Branch: master
Commit: 91f39a558782d291aafeca759d8faa5fdb6ba802
Changeset: http://git.rtems.org/rtems/commit/?id=91f39a558782d291aafeca759d8faa5fdb6ba802
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jul 24 11:56:25 2018 +0200
smptests: Fix format warnings
---
testsuites/smptests/smpschedaffinity01/init.c | 41 +++++++++++++++++++--------
testsuites/smptests/smpschedaffinity05/init.c | 9 ++++--
2 files changed, 36 insertions(+), 14 deletions(-)
diff --git a/testsuites/smptests/smpschedaffinity01/init.c b/testsuites/smptests/smpschedaffinity01/init.c
index 2d4585f..5e27f61 100644
--- a/testsuites/smptests/smpschedaffinity01/init.c
+++ b/testsuites/smptests/smpschedaffinity01/init.c
@@ -93,7 +93,11 @@ static void test(void)
/* Skip if this cpu doesn't exist, don't create task */
if ( task_data[i].expected_cpu >= cpu_count ) {
- printf( "Skipping TA0%d because on a core we do not have\n", i );
+ printf(
+ "Skipping TA0%" PRIdrtems_task_argument
+ " because on a core we do not have\n",
+ i
+ );
continue;
}
@@ -106,34 +110,47 @@ static void test(void)
&task_data[ i ].id
);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
-
- printf("Set TA%d affinity to cpu %d\n", i, task_data[i].expected_cpu );
+
+ printf(
+ "Set TA%" PRIdrtems_task_argument " affinity to cpu %d\n",
+ i,
+ task_data[i].expected_cpu
+ );
sc = rtems_task_set_affinity( task_data[ i ].id, size, &task_data[i].cpuset );
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
-
- printf("Start TA%d on cpu %d\n", i, task_data[i].expected_cpu);
+
+ printf(
+ "Start TA%" PRIdrtems_task_argument " on cpu %d\n",
+ i,
+ task_data[i].expected_cpu
+ );
sc = rtems_task_start( task_data[ i ].id, task, i );
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
/* spin for 100 ticks */
test_delay(100);
-
+
printf("Verify Tasks Ran\n");
for (i = 0; i < NUM_CPUS; i++) {
/* Skip if this cpu doesn't exist, task doesn't exist */
if ( task_data[i].expected_cpu >= cpu_count ) {
- printf( "Skipping TA0%d because on a core we do not have\n", i );
+ printf(
+ "Skipping TA0%" PRIdrtems_task_argument
+ " because on a core we do not have\n",
+ i
+ );
continue;
}
/* print the expected and actual values */
- printf( "TA0%d: ran=%d expected=%d actual=%d\n",
- i,
- task_data[i].ran,
- task_data[i].expected_cpu,
- task_data[i].actual_cpu
+ printf(
+ "TA0%" PRIdrtems_task_argument ": ran=%d expected=%d actual=%d\n",
+ i,
+ task_data[i].ran,
+ task_data[i].expected_cpu,
+ task_data[i].actual_cpu
);
/* Abort test if values are not as expected */
diff --git a/testsuites/smptests/smpschedaffinity05/init.c b/testsuites/smptests/smpschedaffinity05/init.c
index 4c8faaa..632cbef 100644
--- a/testsuites/smptests/smpschedaffinity05/init.c
+++ b/testsuites/smptests/smpschedaffinity05/init.c
@@ -176,7 +176,8 @@ static void test(void)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
printf(
- "Start TA%d at priority %" PRIu32 " on cpu %d\n",
+ "Start TA%" PRIdrtems_task_argument " at priority %"
+ PRIu32 " on cpu %d\n",
i,
task_data[i].priority,
task_data[i].expected_cpu
@@ -192,7 +193,11 @@ static void test(void)
i = TASK_COUNT - 1;
task_data[ i ].priority = 4;
- printf("Set TA%d priority %" PRIu32 "\n", i,task_data[i].priority );
+ printf(
+ "Set TA%" PRIdrtems_task_argument " priority %" PRIu32 "\n",
+ i,
+ task_data[i].priority
+ );
sc = rtems_task_set_priority(
task_data[ i ].id,
task_data[ i ].priority,
More information about the vc
mailing list