From: Imre Deak Subject: [PATCH 21/22] flip_test: add check to see if any event has occured Date: Tue, 16 Oct 2012 17:34:55 +0300 Message-ID: <1350398096-3649-22-git-send-email-imre.deak@intel.com> References: <1350398096-3649-1-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id EB2EA9F4DB for ; Tue, 16 Oct 2012 07:35:44 -0700 (PDT) In-Reply-To: <1350398096-3649-1-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org At the moment select() would time out in case we don't get any event. When we add vblank events in a later patch, it's possible that we receive one type of events but not the other type. In this case select() doesn't time out and we need another way to detect this. Signed-off-by: Imre Deak --- tests/flip_test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/flip_test.c b/tests/flip_test.c index 82ab347..2b70f2a 100644 --- a/tests/flip_test.c +++ b/tests/flip_test.c @@ -516,6 +516,11 @@ fb_is_bound(struct test_output *o, int fb) static void check_final_state(struct test_output *o, struct event_state *es, unsigned int ellapsed) { + if (es->count == 0) { + fprintf(stderr, "no %s event received\n", es->name); + exit(12); + } + /* Verify we drop no frames, but only if it's not a TV encoder, since * those use some funny fake timings behind userspace's back. */ if (o->flags & TEST_CHECK_TS && !analog_tv_connector(o)) { -- 1.7.9.5