From patchwork Thu Dec 4 13:58:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 5438191 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F11FF9F1D4 for ; Thu, 4 Dec 2014 13:58:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D8B6201BB for ; Thu, 4 Dec 2014 13:58:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 59E602012D for ; Thu, 4 Dec 2014 13:58:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C1DA86E370; Thu, 4 Dec 2014 05:58:57 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 8AF8D6E370 for ; Thu, 4 Dec 2014 05:58:56 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 04 Dec 2014 05:57:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,691,1406617200"; d="scan'208";a="493565436" Received: from mlangan-mobl1.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.31.122]) by orsmga003.jf.intel.com with ESMTP; 04 Dec 2014 05:55:34 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Thu, 4 Dec 2014 13:58:54 +0000 Message-Id: <1417701534-21980-1-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [Intel-gfx] [PATCH i-g-t] gem_bad_reloc: Don't flip-flop between SKIP and PASS 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 Here is a cheap way for this test to give consistent results. This doesn't change the usefulness of this test, hopefully. Signed-off-by: Damien Lespiau --- tests/gem_bad_reloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/gem_bad_reloc.c b/tests/gem_bad_reloc.c index df0100f..ef6b52a 100644 --- a/tests/gem_bad_reloc.c +++ b/tests/gem_bad_reloc.c @@ -87,7 +87,13 @@ static int negative_reloc(int fd, unsigned flags) gem_close(fd, gem_exec[1].handle); igt_info("Found offset %ld for 4k batch\n", (long)gem_exec[0].offset); - igt_require(gem_exec[0].offset < BIAS); + /* + * Ideally we'd like to be able to control where the kernel is going to + * place the buffer. We don't SKIP here because it causes the test + * to "randomly" flip-flop between the SKIP and PASS states. + */ + if (gem_exec[0].offset < BIAS) + return 0; memset(gem_reloc, 0, sizeof(gem_reloc)); for (i = 0; i < sizeof(gem_reloc)/sizeof(gem_reloc[0]); i++) {