diff mbox series

[v1,2/2] test: time: add verbose error message

Message ID 1498489208-6376-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v1,1/2] configure: remove dependency of autoconf-archive | expand

Commit Message

Github ODP bot June 26, 2017, 3 p.m. UTC
From: Maxim Uvarov <maxim.uvarov@linaro.org>


On arm64 CI found error on that line. Do more verbose message
to better understand what issue is.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 59 (muvarov:master_timer_debug)
 ** https://github.com/Linaro/odp/pull/59
 ** Patch: https://github.com/Linaro/odp/pull/59.patch
 ** Base sha: 497c339f94e35d5fadeff539cebfbf44d698dc7e
 ** Merge commit sha: 5c4645202983659c0f43c24fa9d5291d8ec4e1f4
 **/
 test/common_plat/validation/api/time/time.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/common_plat/validation/api/time/time.c b/test/common_plat/validation/api/time/time.c
index e2ca2e17..86525fb4 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);