From patchwork Wed Nov 9 16:15:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9419751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ADCD7601C0 for ; Wed, 9 Nov 2016 16:17:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A06C6289E5 for ; Wed, 9 Nov 2016 16:17:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9314528AD0; Wed, 9 Nov 2016 16:17:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3555B289E5 for ; Wed, 9 Nov 2016 16:17:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AEE6C6E6D9; Wed, 9 Nov 2016 16:17:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5CD006E6D9 for ; Wed, 9 Nov 2016 16:17:04 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id p190so30277091wmp.1 for ; Wed, 09 Nov 2016 08:17:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=9ksNCu4NUaC68HXa02UaiPUz5ZSsfJyhFJXaHhIzy0Y=; b=YeSdKlKhOiSHGI6dBPUc9cV1BF9XrZ2jrhMecPo+0Weox/FQF39/5MkXszZg8Be3K2 NFAaPmsbrz02X0SZQBhFfZksnr1N8D++AfWrDveThQyccawuy+kwAHeHI3CyXrCkRIGs LpJ9ZzKFt0USQhE/FDnr2Mljuu2BHyS3qOFmP/UTLDvjfs1ylWECzfLixWVh208Zm1T5 pBkyPJGjdob6f0o8T7AP6WfLm9KjI2bXXaMe1XktYYc95tKrJq+ytev38mMLRPfXB/vD 5qSuecudTEiz2qGRx4vJmys3gxooLAzqjzoYhYOX5QoaaE4+DqzkyK7ihdGCj8XwovuN Ir5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=9ksNCu4NUaC68HXa02UaiPUz5ZSsfJyhFJXaHhIzy0Y=; b=ZUc3wU0j+tC4SIPAb/cEjMFhM8Oe3fm/SnG1D3Ir4R4/xtKMzmoiC3sgOmmIA2ABwz rNtsIxVyS2mfSWedctEqdG2M7ElmjTV2vZoPqrvsuGY8NQfI+QyP18MLjDU30a2upNrx DbMJCpl3kZM9fKPNuKjEPepHUCD1459ej4IIeZAcjYt9YHm/CCwivwW1mdZUIDUwof0B LYyLs9DPn3LnNwzpUjXGlRG6aQL0M7T0DKLZFBqhVPIf1tZcwDMXNPgG9a7TLOPYZcnJ d6OJt6R3gfdbk6mVloGJLsgDZ5t/EaZlx8ieQwidgz5G0WqoPC7ySmrUjY5cp/WA9DVt 07DA== X-Gm-Message-State: ABUngvfDbJlHHjlXtTMg5uvcH//hrTCJBeitJdNGNpgrkb7WdN7nXn9dKwY+m5k7Iv+0lA== X-Received: by 10.28.17.213 with SMTP id 204mr1137830wmr.17.1478708223041; Wed, 09 Nov 2016 08:17:03 -0800 (PST) Received: from sixbynine.org (82-132-216-223.dab.02.net. [82.132.216.223]) by smtp.gmail.com with ESMTPSA id w7sm7743493wmd.24.2016.11.09.08.17.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Nov 2016 08:17:02 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Wed, 9 Nov 2016 16:15:58 +0000 Message-Id: <20161109161602.2402-8-robert@sixbynine.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161109161602.2402-1-robert@sixbynine.org> References: <20161109161602.2402-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH igt v3 07/11] igt/gem_exec_parse: update bitmasks test for v >=8 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-Virus-Scanned: ClamAV using ClamSMTP With v8 of the command parser (where we won't get an EINVAL for an access violation) this updates the bitmasks test to explicitly confirm that the command became a NOOP by reading back from where the QW_WRITE would have otherwise landed. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld --- tests/gem_exec_parse.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c index 63f4efe..1aa5114 100644 --- a/tests/gem_exec_parse.c +++ b/tests/gem_exec_parse.c @@ -472,10 +472,20 @@ igt_main 0, MI_BATCH_BUFFER_END, }; - exec_batch(fd, handle, - pc, sizeof(pc), - I915_EXEC_RENDER, - -EINVAL); + if (parser_version >= 8) { + /* Expect to read back zero since the command should be + * squashed to a NOOP + */ + exec_batch_patched(fd, handle, + pc, sizeof(pc), + 8, /* patch offset, */ + 0x0); + } else { + exec_batch(fd, handle, + pc, sizeof(pc), + I915_EXEC_RENDER, + -EINVAL); + } } igt_subtest("batch-without-end") {