[Intel-gfx] [PATCH i-g-t 1/6] tests/kms_flip: Print timestamps in a consistent form

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Tue Jun 21 17:25:27 UTC 2016


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_flip.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 6ec97d0a8534..f61d199b648f 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -132,11 +132,11 @@ struct event_state {
 static void dump_event_state(const struct event_state *es)
 {
 	igt_debug("name = %s\n"
-		  "last_ts = %ld.%ld usec\n"
-		  "last_received_ts = %ld.%ld usec\n"
+		  "last_ts = %ld.%06ld\n"
+		  "last_received_ts = %ld.%06ld\n"
 		  "last_seq = %u\n"
-		  "current_ts = %ld.%ld usec\n"
-		  "current_received_ts = %ld.%ld usec\n"
+		  "current_ts = %ld.%06ld\n"
+		  "current_received_ts = %ld.%06ld\n"
 		  "current_seq = %u\n"
 		  "count = %u\n"
 		  "seq_step = %d\n",
@@ -650,7 +650,7 @@ static void check_state(struct test_output *o, struct event_state *es)
 	timersub(&es->current_ts, &es->current_received_ts, &diff);
 	if (!analog_tv_connector(o)) {
 		igt_assert_f(diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_usec <= 2000),
-			     "%s ts delayed for too long: %lds, %ldusec\n",
+			     "%s ts delayed for too long: %ld.%06ld\n",
 			     es->name, diff.tv_sec, diff.tv_usec);
 
 	}
@@ -661,7 +661,7 @@ static void check_state(struct test_output *o, struct event_state *es)
 	timersub(&es->current_ts, &es->last_received_ts, &diff);
 	igt_assert_f(timercmp(&es->last_received_ts, &es->current_ts, <),
 		     "%s ts before the %s was issued!\n"
-		     "timerdiff %lds, %ldusec\n",
+		     "timerdiff %ld.%06ld\n",
 		     es->name, es->name,
 		     diff.tv_sec, diff.tv_usec);
 
@@ -694,7 +694,7 @@ static void check_state(struct test_output *o, struct event_state *es)
 
 		igt_assert_f(fabs((((double) diff.tv_usec) - usec_interflip) /
 				  usec_interflip) <= 0.005,
-			     "inter-%s ts jitter: %lds, %ldusec\n",
+			     "inter-%s ts jitter: %ld.%06ld\n",
 			     es->name, diff.tv_sec, diff.tv_usec);
 
 		igt_assert_f(es->current_seq == es->last_seq + o->seq_step,
-- 
2.7.4



More information about the Intel-gfx mailing list