From patchwork Tue May 10 14:33:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Feceoru, Gabriel" X-Patchwork-Id: 9058501 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1B6409F30C for ; Tue, 10 May 2016 14:33:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50A672014A for ; Tue, 10 May 2016 14:33:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3011F20148 for ; Tue, 10 May 2016 14:33:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21AC76E66E; Tue, 10 May 2016 14:33:45 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id B34F86E66E for ; Tue, 10 May 2016 14:33:43 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 10 May 2016 07:33:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,604,1455004800"; d="scan'208";a="962851943" Received: from gfeceoru-ms-7924.rb.intel.com ([10.237.104.199]) by fmsmga001.fm.intel.com with ESMTP; 10 May 2016 07:33:42 -0700 From: Gabriel Feceoru To: intel-gfx@lists.freedesktop.org Date: Tue, 10 May 2016 17:33:47 +0300 Message-Id: <1462890827-18603-1-git-send-email-gabriel.feceoru@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1462886858-425-1-git-send-email-gabriel.feceoru@intel.com> References: <1462886858-425-1-git-send-email-gabriel.feceoru@intel.com> Cc: Jani Nikula , Daniel Vetter Subject: [Intel-gfx] [PATCH i-g-t v2] tests/kms_flip: Adjust tolerance when counting frames X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If count == 100 and expected == 99 this condition fails (99*101/100 = 99.99). (v2): Increased the tolerance range, as suggested by Jani. Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Gabriel Feceoru --- 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 eda2fcc..ceb0e0b 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1187,7 +1187,7 @@ static void check_final_state(struct test_output *o, struct event_state *es, count *= o->seq_step; expected = elapsed / frame_time(o); - igt_assert_f(count >= expected * 99/100 && count <= expected * 101/100, + igt_assert_f(count >= expected * 98/100 && count <= expected * 102/100, "dropped frames, expected %d, counted %d, encoder type %d\n", expected, count, o->kencoder[0]->encoder_type); }