From patchwork Fri Aug 7 17:29:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 6972261 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DBAC0C05AC for ; Fri, 7 Aug 2015 17:29:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 099C5202B4 for ; Fri, 7 Aug 2015 17:29:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D4EBD205EC for ; Fri, 7 Aug 2015 17:29:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD6F76E21E; Fri, 7 Aug 2015 10:29:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 788CD6E224 for ; Fri, 7 Aug 2015 10:29:28 -0700 (PDT) Received: by wibxm9 with SMTP id xm9so74434899wib.1 for ; Fri, 07 Aug 2015 10:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qjLI1QxwNcCsPQ+V1eurEzFB/oLUh70rf1LDJS1FgEY=; b=Gkazdvdqa9pHH7FOBFOtsUVnEwVuOTd6cl2yzkzTtsnasUMRVmaylm5yZ/9zNvDcxq 9+iCOm5V5NxSi1HrfboBJsMe/T4hNA0noGpnMlQwZtv1G5smNuInKtrYSuV6esEFjT+x 39qWifcaKvjuNWu/W8hWlvK9Li0s4EOwioNDY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qjLI1QxwNcCsPQ+V1eurEzFB/oLUh70rf1LDJS1FgEY=; b=kS/QwS7HvNQFCx4I1BUu2/UIlH1Q+PX6Z4qx4BR903xCPVvtC7rwXYQjV3RQdqOY3k jIQ2hAIfXgH2RHlYCfe0ounhCpQj3ZkTCV4gbHoz0e5uoKJTkxLvS5porXwTijed9LUd QQeSZqOMwW6RA/DrzNQcV/pUszuOPqi577aEV2NUckX3SuoD5udM+MSSxxqz+MwLoafd byBLBzUrg9ywYuwtE9mEU275D8AwshTEj7Bb0Sr5vHRYLRnu5x/Sy+0f+7kPubc+jXyG PPCKrkeTFZhT/NoYwVv1Sv5BPJgA6QXB0w/vrRfPz7qAWgwUzq/rdnykc7Jz+52z4ztw 7lLA== X-Gm-Message-State: ALoCoQnHvsWYG4a24Lr6xjCuZO47phvLXXk9NIMgdDOE7KtnwMD7LMORLbkDDiw5xB5C7plI+jfM X-Received: by 10.194.118.197 with SMTP id ko5mr17082720wjb.58.1438968567079; Fri, 07 Aug 2015 10:29:27 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id fo1sm9406056wib.24.2015.08.07.10.29.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 10:29:26 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Fri, 7 Aug 2015 19:29:18 +0200 Message-Id: <1438968558-1036-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1438968558-1036-1-git-send-email-daniel.vetter@ffwll.ch> References: <1438968558-1036-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Daniel Vetter Subject: [Intel-gfx] [PATCH i-g-t 3/3] tests: Document ABI extension catchers 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,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Our invalid-flags/params testcases are meant to catch abi extensions by just testing for the next available flag/param. Unfortunately we need that since without those we forgot to write testcases for these new flags way too often :( But it's not entirely clear why this is, so document this trick with comments. Also gem_wait wasn't this paranoid, so change the testcase to be so. Signed-off-by: Daniel Vetter --- tests/gem_ctx_param_basic.c | 3 +++ tests/gem_exec_params.c | 3 +++ tests/gem_wait.c | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/gem_ctx_param_basic.c b/tests/gem_ctx_param_basic.c index 1e7e8ff40703..430a53b22c57 100644 --- a/tests/gem_ctx_param_basic.c +++ b/tests/gem_ctx_param_basic.c @@ -149,6 +149,9 @@ igt_main TEST_SUCCESS(LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM); } + /* NOTE: This testcase intentionally tests for the next free parameter + * to catch ABI extensions. Don't "fix" this testcase without adding all + * the tests for the new param first. */ ctx_param.param = LOCAL_CONTEXT_PARAM_NO_ZEROMAP + 1; igt_subtest("invalid-param-get") { diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c index e9c13a40f8a7..b33a7408c476 100644 --- a/tests/gem_exec_params.c +++ b/tests/gem_exec_params.c @@ -221,6 +221,9 @@ igt_main /* HANDLE_LUT and NO_RELOC are already exercised by gem_exec_lut_handle */ igt_subtest("invalid-flag") { + /* NOTE: This test intentionally exercise the next available + * flag. Don't "fix" this testcase without adding the required + * tests for the new flag first. */ execbuf.flags = I915_EXEC_RENDER | (LOCAL_I915_EXEC_RESOURCE_STREAMER << 1); RUN_FAIL(EINVAL); } diff --git a/tests/gem_wait.c b/tests/gem_wait.c index 958bf93ff5fd..a785b16e783e 100644 --- a/tests/gem_wait.c +++ b/tests/gem_wait.c @@ -236,7 +236,10 @@ static void invalid_flags(int fd) wait.bo_handle = handle; wait.timeout_ns = 1; - wait.flags = 0xffffffff; + /* NOTE: This test intentionally tests for just the next available flag. + * Don't "fix" this testcase without the ABI testcases for new flags + * first. */ + wait.flags = 1; ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_WAIT, &wait); igt_assert(ret != 0 && errno == EINVAL);