diff mbox series

[v2,1/1] test: time: add verbose error message

Message ID 1498492806-19679-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v2,1/1] test: time: add verbose error message | expand

Commit Message

Github ODP bot June 26, 2017, 4 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: 7a8afd1dcac513fe20ac8d0a4c58e1dc7d1c4792
 **/
 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);