Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]>
---
This triggers some warnings in checkpatch about long string and multi-line
strings.
Seeing the latest debate about split string vs > 80 cols, I tried to keep the
same format.
If you want me to fix it one way opr the other, please let me known.
test/validation/odp_synchronizers.c | 27 ++++++++++++++-------------
test/validation/odp_timer.c | 14 +++++++-------
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/test/validation/odp_synchronizers.c
b/test/validation/odp_synchronizers.c
index d3539c5..edb6bf1 100644
--- a/test/validation/odp_synchronizers.c
+++ b/test/validation/odp_synchronizers.c
@@ -181,7 +181,8 @@ static uint32_t barrier_test(per_thread_mem_t
*per_thread_mem,
barrier_cnt2 = global_mem->barrier_cnt2;
if ((barrier_cnt1 != cnt) || (barrier_cnt2 != cnt)) {
- printf("thread_num=%u barrier_cnts of %u %u cnt=%u\n",
+ printf("thread_num=%"PRIu32" barrier_cnts of %"PRIu32
+ " %"PRIu32" cnt=%"PRIu32"\n",
thread_num, barrier_cnt1, barrier_cnt2, cnt);
barrier_errs++;
}
@@ -230,8 +231,8 @@ static uint32_t barrier_test(per_thread_mem_t
*per_thread_mem,
}
if ((global_mem->g_verbose) && (barrier_errs != 0))
- printf("\nThread %u (id=%d core=%d) had %u barrier_errs"
- " in %u iterations\n", thread_num,
+ printf("\nThread %"PRIu32" (id=%d core=%d) had %"PRIu32
+ " barrier_errs in %"PRIu32" iterations\n",
thread_num,
per_thread_mem->thread_id,
per_thread_mem->thread_core, barrier_errs, iterations);
@@ -434,8 +435,8 @@ static void *no_lock_functional_test(void *arg UNUSED)
}
if (global_mem->g_verbose)
- printf("\nThread %u (id=%d core=%d) had %u sync_failures"
- " in %u iterations\n", thread_num,
+ printf("\nThread %"PRIu32" (id=%d core=%d) had %"PRIu32"
sync_failures"
+ " in %"PRIu32" iterations\n", thread_num,
per_thread_mem->thread_id,
per_thread_mem->thread_core,
sync_failures, iterations);
@@ -522,8 +523,8 @@ static void *spinlock_functional_test(void *arg UNUSED)
if ((global_mem->g_verbose) &&
((sync_failures != 0) || (is_locked_errs != 0)))
- printf("\nThread %u (id=%d core=%d) had %u sync_failures"
- " and %u is_locked_errs in %u iterations\n", thread_num,
+ printf("\nThread %"PRIu32" (id=%d core=%d) had %"PRIu32"
sync_failures"
+ " and %"PRIu32" is_locked_errs in %"PRIu32"
iterations\n", thread_num,
per_thread_mem->thread_id, per_thread_mem->thread_core,
sync_failures, is_locked_errs, iterations);
@@ -607,8 +608,8 @@ static void *ticketlock_functional_test(void *arg UNUSED)
if ((global_mem->g_verbose) &&
((sync_failures != 0) || (is_locked_errs != 0)))
- printf("\nThread %u (id=%d core=%d) had %u sync_failures"
- " and %u is_locked_errs in %u iterations\n", thread_num,
+ printf("\nThread %"PRIu32" (id=%d core=%d) had %"PRIu32"
sync_failures"
+ " and %"PRIu32" is_locked_errs in %"PRIu32"
iterations\n", thread_num,
per_thread_mem->thread_id, per_thread_mem->thread_core,
sync_failures, is_locked_errs, iterations);
@@ -685,8 +686,8 @@ static void *rwlock_functional_test(void *arg UNUSED)
}
if ((global_mem->g_verbose) && (sync_failures != 0))
- printf("\nThread %u (id=%d core=%d) had %u sync_failures"
- " in %u iterations\n", thread_num,
+ printf("\nThread %"PRIu32" (id=%d core=%d) had %"PRIu32"
sync_failures"
+ " in %"PRIu32" iterations\n", thread_num,
per_thread_mem->thread_id,
per_thread_mem->thread_core,
sync_failures, iterations);
@@ -1071,12 +1072,12 @@ int tests_global_init(void)
if (max_threads < global_mem->g_num_threads) {
printf("Requested num of threads is too large\n");
- printf("reducing from %u to %u\n", global_mem->g_num_threads,
+ printf("reducing from %"PRIu32" to %"PRIu32"\n",
global_mem->g_num_threads,
max_threads);
global_mem->g_num_threads = max_threads;
}
- printf("Num of threads used = %u\n", global_mem->g_num_threads);
+ printf("Num of threads used = %"PRIu32"\n", global_mem->g_num_threads);
return ret;
}
diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
index 1bc4e2a..554b353 100644
--- a/test/validation/odp_timer.c
+++ b/test/validation/odp_timer.c
@@ -389,13 +389,13 @@ static void *worker_entrypoint(void *arg TEST_UNUSED)
CU_FAIL("odp_timer_free");
}
- LOG_DBG("Thread %u: %u timers set\n", thr, nset);
- LOG_DBG("Thread %u: %u timers reset\n", thr, nreset);
- LOG_DBG("Thread %u: %u timers cancelled\n", thr, ncancel);
- LOG_DBG("Thread %u: %u timers reset/cancelled too late\n",
+ LOG_DBG("Thread %u: %"PRIu32" timers set\n", thr, nset);
+ LOG_DBG("Thread %u: %"PRIu32" timers reset\n", thr, nreset);
+ LOG_DBG("Thread %u: %"PRIu32" timers cancelled\n", thr, ncancel);
+ LOG_DBG("Thread %u: %"PRIu32" timers reset/cancelled too late\n",
thr, ntoolate);
- LOG_DBG("Thread %u: %u timeouts received\n", thr, nrcv);
- LOG_DBG("Thread %u: %u stale timeout(s) after odp_timer_free()\n",
+ LOG_DBG("Thread %u: %"PRIu32" timeouts received\n", thr, nrcv);
+ LOG_DBG("Thread %u: %"PRIu32" stale timeout(s) after
odp_timer_free()\n",
thr, nstale);
/* Delay some more to ensure timeouts for expired timers can be
@@ -506,7 +506,7 @@ static void test_odp_timer_all(void)
/* Wait for worker threads to exit */
odp_cunit_thread_exit(&thrdarg);
- LOG_DBG("Number of timeouts delivered/received too late: %u\n",
+ LOG_DBG("Number of timeouts delivered/received too late: %"PRIu32"\n",
odp_atomic_load_u32(&ndelivtoolate));
/* Check some statistics after the test */
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp