From patchwork Mon Nov 14 20:51:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9428363 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 E5D646047D for ; Mon, 14 Nov 2016 20:52:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D717728ADC for ; Mon, 14 Nov 2016 20:52:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC2C028AE3; Mon, 14 Nov 2016 20:52:04 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,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 857FF28ADC for ; Mon, 14 Nov 2016 20:52:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26BAC6E51A; Mon, 14 Nov 2016 20:52:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 229F56E51A for ; Mon, 14 Nov 2016 20:52:02 +0000 (UTC) Received: by mail-pf0-x241.google.com with SMTP id y68so6678019pfb.1 for ; Mon, 14 Nov 2016 12:52:02 -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=qms4QfOiQPb0IRgcPJ1C6lgehfMMZUJ3MQ+eypN/2Y8=; b=OP7roHqw7XaVKPwt1ZwvujUPArPyLpK0iYvxPSWT2Q6szWowz+24tdfvHt93FYLVVs 30o+bErt6vKUy1zhbkzKZvb23kqdhPl3HJhDhwZj0EEIRDchfNcm0w3xpED9aK7C27dm rtsIc7INEykNGxD9SwnqbzPymX+3kvQLBa6lIozQUPFX70OXVy/q6B3kbyHHILjNrM4n FcGnrKah0ODizkByHsdko2c4G0ZCq57yNTk40Ta8WpiLklM5JjkMbTJ/YwBxW+l5DlBo lFdxjSEnkkLGZ12LZA35RcZpOARS6ekP6bYhrTGFLUhkPTllbYBFlVnYpj+yNPCmdo1q q62Q== 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=qms4QfOiQPb0IRgcPJ1C6lgehfMMZUJ3MQ+eypN/2Y8=; b=BoaMGL38w3/2j85y/3Hd3LYeTbvHsQ9aAgnA+1Yl/uDfnS+KklP0YFu7TieiirgQfT cETPgXXI5GlPhUwtDv4EoAD0v95Izlxy3XreJYWxSUu2j0L814Rhk5s6aYimEvgR4mnb nqlC2/ym6u1hC/dqqwy10whUEZA0M467lWZLV1ohsmxhnZfNgC7EBGNHxYboAK0AwstF 7pOrPjNts9JwDj0BkFG5J/PoJDv5FDLCER9K2G6UU/WoHHw4DkoBzwyVe+HrCPza/qMW rK7G20v/ew8g+9vqkd+YrGKWYY8RsbfQD9bge8+vBuVZUMuo405EhkS4liMjN/wCOHl6 jktw== X-Gm-Message-State: ABUngvfg7P891spjMuBEEV9g3c5CN1SfgkSfdYxEDQE8GIqROkB+Kw3JUiiZ50cycWAfOw== X-Received: by 10.98.198.207 with SMTP id x76mr39297879pfk.33.1479156721698; Mon, 14 Nov 2016 12:52:01 -0800 (PST) Received: from sixbynine.org (cpc26-heme10-2-0-cust305.9-1.cable.virginm.net. [86.3.57.50]) by smtp.gmail.com with ESMTPSA id af14sm37407236pac.13.2016.11.14.12.52.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Nov 2016 12:52:01 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Mon, 14 Nov 2016 20:51:18 +0000 Message-Id: <20161114205122.10742-10-robert@sixbynine.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161114205122.10742-1-robert@sixbynine.org> References: <20161114205122.10742-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH igt v4 09/13] 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 03e4d0e..d5769e4 100644 --- a/tests/gem_exec_parse.c +++ b/tests/gem_exec_parse.c @@ -504,10 +504,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") {