public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_flip: Fix comparison of unsigned integers
@ 2019-02-07 13:36 Petri Latvala
  2019-02-07 13:53 ` Daniel Vetter
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Petri Latvala @ 2019-02-07 13:36 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

Difference of unsigned ints is unsigned int, and therefore always
larger than zero.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/kms_flip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 798fc4e8..96f4a2f7 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -502,7 +502,7 @@ static void check_state(const struct test_output *o, const struct event_state *e
 	if (o->flags & TEST_TS_CONT) {
 		/* Ignore seq_step here since vblank waits time out immediately
 		 * when we kill the crtc. */
-		igt_assert_f(es->current_seq - es->last_seq >= 0,
+		igt_assert_f(es->current_seq >= es->last_seq,
 			     "unexpected %s seq %u, should be >= %u\n",
 			     es->name, es->current_seq, es->last_seq);
 		igt_assert_f(es->current_seq - es->last_seq <= 150,
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-03-06 11:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-07 13:36 [igt-dev] [PATCH i-g-t] tests/kms_flip: Fix comparison of unsigned integers Petri Latvala
2019-02-07 13:53 ` Daniel Vetter
2019-02-07 14:02 ` Ville Syrjälä
2019-03-05 12:55   ` Petri Latvala
2019-03-05 13:02     ` Chris Wilson
2019-03-06 11:17       ` Petri Latvala
2019-02-07 14:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox