[i-g-t,v3] tests/kms_flip: improve logging when timing out

Submitted by Ser, Simon on June 24, 2019, 8:28 a.m.

Details

Message ID 20190624082822.7125-1-simon.ser@intel.com
State Accepted
Headers show
Series "tests/kms_flip: improve logging when timing out" ( rev: 3 ) in IGT

Not browsing as part of any series.

Commit Message

Ser, Simon June 24, 2019, 8:28 a.m.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105363
---

Changes from v2 to v3: always log the vblank duration (Arek)

 tests/kms_flip.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--
2.22.0

Patch hide | download patch | download mbox

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 2a158d97bbec..0a8d1c55a7aa 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -686,14 +686,16 @@  static unsigned int run_test_step(struct test_output *o)
 	    !(o->pending_events & EVENT_VBLANK) && o->flip_state.count > 0) {
 		struct vblank_reply reply;
 		unsigned int exp_seq;
-		unsigned long start;
+		unsigned long start, end;

 		exp_seq = o->flip_state.current_seq;
 		start = gettime_us();
 		do_or_die(__wait_for_vblank(TEST_VBLANK_ABSOLUTE |
 					    TEST_VBLANK_BLOCK, o->pipe, exp_seq,
 					    0, &reply));
-		igt_assert(gettime_us() - start < 500);
+		end = gettime_us();
+		igt_debug("Vblank took %luus\n", end - start);
+		igt_assert(end - start < 500);
 		igt_assert_eq(reply.sequence, exp_seq);
 		igt_assert(timercmp(&reply.ts, &o->flip_state.last_ts, ==));
 	}

Comments

On Mon, Jun 24, 2019 at 11:28:22AM +0300, Simon Ser wrote:
> Signed-off-by: Simon Ser <simon.ser@intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105363
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

Please make sure that filters are updated before merging.
On Mon, 2019-06-24 at 15:00 +0300, Arkadiusz Hiler wrote:
> On Mon, Jun 24, 2019 at 11:28:22AM +0300, Simon Ser wrote:

> > Signed-off-by: Simon Ser <simon.ser@intel.com>

> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105363

> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

> 

> Please make sure that filters are updated before merging.


Martin, can you update the filters of that issue to include:

    igt_assert(end - start < 500);

Thanks
On Mon, 2019-06-24 at 12:44 +0000, Ser, Simon wrote:
> On Mon, 2019-06-24 at 15:00 +0300, Arkadiusz Hiler wrote:

> > On Mon, Jun 24, 2019 at 11:28:22AM +0300, Simon Ser wrote:

> > > Signed-off-by: Simon Ser <simon.ser@intel.com>

> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105363

> > Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

> > 

> > Please make sure that filters are updated before merging.

> 

> Martin, can you update the filters of that issue to include:

> 

>     igt_assert(end - start < 500);


Arek taught me how to do it in the end :)

> Thanks

> _______________________________________________

> igt-dev mailing list

> igt-dev@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/igt-dev