From: Intel Date: Wed, 19 Dec 2012 23:00:00 +0000 (+0100) Subject: app: cosmetic X-Git-Tag: spdx-start~11327 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a5d045b2b404f1095e78f6f77ce3a9aa7fa1f25c;p=dpdk.git app: cosmetic Signed-off-by: Intel --- diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c index 20c3f05a3e..a49e1421a7 100644 --- a/app/test/test_alarm.c +++ b/app/test/test_alarm.c @@ -132,7 +132,8 @@ test_multi_alarms(void) rte_delay_ms(3500); if (cb_count.cnt != 2 || rm_count != 1) { printf("Error: invalid flags count or alarm removal failure" - " - flags value = %d, expected = %d\n", cb_count.cnt, 2); + " - flags value = %d, expected = %d\n", + (int)cb_count.cnt, 2); /* remove any callbacks that might remain */ rte_eal_alarm_cancel(test_multi_cb, (void *)-1); return -1; diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c index 9faa063355..8b115b36f1 100644 --- a/app/test/test_atomic.c +++ b/app/test/test_atomic.c @@ -349,7 +349,7 @@ test_atomic(void) rte_atomic32_clear(&synchro); if (rte_atomic32_read(&count) != NUM_ATOMIC_TYPES) { - printf("Atomic inc and test failed %d\n", count.cnt); + printf("Atomic inc and test failed %d\n", (int)count.cnt); return -1; } diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c index 377643a066..1d2ad25605 100644 --- a/app/test/test_cycles.c +++ b/app/test/test_cycles.c @@ -48,7 +48,7 @@ * Cycles test * =========== * - * - Loop N times and check that the timer alway increments and + * - Loop N times and check that the timer always increments and * never decrements during this loop. * * - Wait one second using rte_usleep() and check that the increment @@ -79,13 +79,13 @@ test_cycles(void) prev_cycles = rte_get_hpet_cycles(); rte_delay_us(1000000); cycles = rte_get_hpet_cycles(); + if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) { - printf("delay_us is not accurate\n"); + printf("delay_us is not accurate: too long\n"); return -1; } - cycles = rte_get_hpet_cycles(); - if ((uint64_t)(cycles - prev_cycles) < (hz)) { - printf("delay_us is not accurate\n"); + if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) { + printf("delay_us is not accurate: too short\n"); return -1; }