[15/22] flip_test: don't skip checks for sequence #1
diff mbox

Message ID 1350398096-3649-16-git-send-email-imre.deak@intel.com
State New, archived
Headers show

Commit Message

Imre Deak Oct. 16, 2012, 2:34 p.m. UTC
So far we skipped some tests for seq#0 and #1, since at that point we
were missing the 'last' state against which we could compare the current
state. Since in the previous patches we fixed the ordering in the test
loop and moved the increment of count to the update state phase, we have
a proper 'last' state for seq#1, so enable the tests already at that
point.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 tests/flip_test.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/tests/flip_test.c b/tests/flip_test.c
index 966089f..f07c0db 100644
--- a/tests/flip_test.c
+++ b/tests/flip_test.c
@@ -232,7 +232,7 @@  static void check_state(struct test_output *o, struct event_state *es)
 	}
 
 
-	if (es->count > 1 && (o->flags & TEST_CHECK_TS) && (!analog_tv_connector(o))) {
+	if (es->count > 0 && (o->flags & TEST_CHECK_TS) && (!analog_tv_connector(o))) {
 		timersub(&es->current_ts, &es->last_ts, &diff);
 		usec_interflip = 1.0 / ((double)o->mode.vrefresh) * 1000.0 * 1000.0;
 		if (fabs((((double) diff.tv_usec) - usec_interflip) /
@@ -280,7 +280,7 @@  static void run_test_step(struct test_output *o)
 	o->current_fb_id = !o->current_fb_id;
 	new_fb_id = o->fb_ids[o->current_fb_id];
 
-	if ((o->flags & TEST_EINVAL) && o->flip_state.count > 1)
+	if ((o->flags & TEST_EINVAL) && o->flip_state.count > 0)
 		assert(do_page_flip(o, new_fb_id) == expected_einval);
 
 	if (o->flags & TEST_MODESET) {