[Intel-gfx] [PATCH i-g-t 5/6] tests/kms_flip: Print the expected diff between two events

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


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

To aid in diagnosing failures, print out the expected time
difference between the two events.

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

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 7718e950b823..f685c945feb1 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -696,8 +696,9 @@ static void check_state(const struct test_output *o, const struct event_state *e
 		usec_interflip = o->seq_step * frame_time(o);
 		igt_assert_f(fabs((usec_diff - usec_interflip) /
 				  usec_interflip) <= 0.005,
-			     "inter-%s ts jitter: %ld.%06ld\n",
-			     es->name, diff.tv_sec, diff.tv_usec);
+			     "inter-%s ts jitter: %ld.%06ld, expected %.6f\n",
+			     es->name, diff.tv_sec, diff.tv_usec,
+			     usec_interflip / USEC_PER_SEC);
 
 		igt_assert_f(es->current_seq == es->last_seq + o->seq_step,
 			     "unexpected %s seq %u, expected %u\n",
-- 
2.7.4



More information about the Intel-gfx mailing list