From b961fe859b1b058ba7abf2a9739922718345b1fa Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Mon, 26 Jun 2017 17:29:36 +0300 Subject: [PATCH] test: time: add verbose error message On arm64 CI found error on that line. Do more verbose message to better understand what issue is. Signed-off-by: Maxim Uvarov --- test/common_plat/validation/api/time/time.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/common_plat/validation/api/time/time.c b/test/common_plat/validation/api/time/time.c index e2ca2e17c4..86525fb474 100644 --- a/test/common_plat/validation/api/time/time.c +++ b/test/common_plat/validation/api/time/time.c @@ -72,7 +72,15 @@ static void time_test_conversion(time_from_ns_cb time_from_ns, uint64_t res) * value in ns is returned after conversions */ upper_limit = ns1 + res; lower_limit = ns1 - res; - CU_ASSERT((ns2 <= upper_limit) && (ns2 >= lower_limit)); + + if (!((ns2 <= upper_limit) && (ns2 >= lower_limit))) { + CU_ASSERT((ns2 <= upper_limit) && (ns2 >= lower_limit)); + fprintf(stderr, "\nlower_limit %" PRIu64 "\n", lower_limit); + fprintf(stderr, "ns1 %" PRIu64 "\n", ns1); + fprintf(stderr, "ns2 %" PRIu64 "\n", ns2); + fprintf(stderr, "upper_limit %" PRIu64 "\n", upper_limit); + fprintf(stderr, "res %" PRIu64 "\n", res); + } ns1 = 60 * 11 * ODP_TIME_SEC_IN_NS; time = time_from_ns(ns1);