From patchwork Wed Nov 8 09:15:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10048045 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 4C24660247 for ; Wed, 8 Nov 2017 09:15:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 446D32A42D for ; Wed, 8 Nov 2017 09:15:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38E7E2A433; Wed, 8 Nov 2017 09:15:19 +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 94B3B2A458 for ; Wed, 8 Nov 2017 09:15:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4174A6E60E; Wed, 8 Nov 2017 09:15:18 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1008F6E60E for ; Wed, 8 Nov 2017 09:15:15 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id s66so8825760wmf.5 for ; Wed, 08 Nov 2017 01:15:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xWJDa3GiLJeti3I8ilxDq2OCNALkN3BBbZYTJWeeHvk=; b=PEn1HK4jQvFpK/uD0iaXBJJpFJe8uADkRGamjjeaktOM2GHVNWshZ/mzz/ViF7Pm3S oBW4zmLIJCUjJI01x07wjWBE09DH37uy7ousBKqh0mJ5v2GP29TzxNDpieJ5TNbEkGtu C7I4HT6c9vgx0SgcHxpbIwgjjQ6mz9VjuJSFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xWJDa3GiLJeti3I8ilxDq2OCNALkN3BBbZYTJWeeHvk=; b=kLruZK0/4QCNbY34MHT2f6pLdjzHYJ6FpkXN9k6XUZHXSd9zglPxprBekGDYyspIFo MgVhF9RuXnoloIP+xqazBLCEJ/ZD6nWQW+pdc6UnALjLpsy0UbsGvJSS8+Il1NMY0QUU LRfc/CGLEC7CRXLkvRmUu7DREfkxmMOhZCeSZ8QNk1uKT0S4BN+z6rn6zFxCKXDSZfD7 uS3142iflQQUEvpS6pr9OEgWQ3YWLR1G6NWpIJxgHcAQwfu3+OnEWFUPNY4hfJ9KLSp1 iJGpG6vOFvxdB806OJXs8BbtIwgjETwyTtRQ1VRbNpDsNtai5cOwZpCYzbC6WUJatpnw mMvw== X-Gm-Message-State: AJaThX6aDKJ8gMIbRq5Riha/SwMxqjsUWmu3PzSGX+ovU0/O4TouHsVd UqdAIiTKrUqm/2r2YLxk3L3BnDLB X-Google-Smtp-Source: ABhQp+RRTGFLKfc/Lv74AfU1+brCFcuyiT1u0vfpl24t7Y+Rx6lD0Id8737nHyMzIGFh9Al1deOTPQ== X-Received: by 10.80.213.14 with SMTP id u14mr2600206edi.87.1510132514154; Wed, 08 Nov 2017 01:15:14 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:5635:0:39d2:f87e:2033:9f6]) by smtp.gmail.com with ESMTPSA id m23sm3668494edc.53.2017.11.08.01.15.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 01:15:13 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 8 Nov 2017 10:15:08 +0100 Message-Id: <20171108091508.6234-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Cc: Daniel Vetter , Daniel Vetter Subject: [Intel-gfx] [PATCH i-g-t] tests: remove gem_ctx_param 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP I'm fed up trying to tilt windmills, if the gem team thinks they don't need these tests we better remove them. We could also remove the invalid-flag subtests which are the failing ones, but since it ends up being me always typing the missing testcases that this one catches (there's no tests afaict that check that context priority rejects bad input) I don't see the point. Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103107 Signed-off-by: Daniel Vetter --- tests/Makefile.sources | 1 - tests/gem_ctx_param.c | 157 ---------------------------------- tests/intel-ci/fast-feedback.testlist | 2 - tests/meson.build | 1 - 4 files changed, 161 deletions(-) delete mode 100644 tests/gem_ctx_param.c diff --git a/tests/Makefile.sources b/tests/Makefile.sources index 24728f13d131..56392a767361 100644 --- a/tests/Makefile.sources +++ b/tests/Makefile.sources @@ -56,7 +56,6 @@ TESTS_progs = \ gem_ctx_basic \ gem_ctx_create \ gem_ctx_exec \ - gem_ctx_param \ gem_ctx_switch \ gem_ctx_thrash \ gem_double_irq_loop \ diff --git a/tests/gem_ctx_param.c b/tests/gem_ctx_param.c deleted file mode 100644 index efdaf191a1ed..000000000000 --- a/tests/gem_ctx_param.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright © 2015 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Authors: - * Daniel Vetter - */ - -#include "igt.h" - -IGT_TEST_DESCRIPTION("Basic test for context set/get param input validation."); - -igt_main -{ - struct local_i915_gem_context_param arg; - int fd; - uint32_t ctx; - - memset(&arg, 0, sizeof(arg)); - - igt_fixture { - fd = drm_open_driver_render(DRIVER_INTEL); - ctx = gem_context_create(fd); - } - - arg.param = LOCAL_CONTEXT_PARAM_BAN_PERIOD; - - /* XXX start to enforce ban period returning -EINVAL when - * transition has been done */ - if (__gem_context_get_param(fd, &arg) == -EINVAL) - arg.param = LOCAL_CONTEXT_PARAM_BANNABLE; - - igt_subtest("basic") { - arg.context = ctx; - gem_context_get_param(fd, &arg); - gem_context_set_param(fd, &arg); - } - - igt_subtest("basic-default") { - arg.context = 0; - gem_context_get_param(fd, &arg); - gem_context_set_param(fd, &arg); - } - - igt_subtest("invalid-ctx-get") { - arg.context = 2; - igt_assert_eq(__gem_context_get_param(fd, &arg), -ENOENT); - } - - igt_subtest("invalid-ctx-set") { - arg.context = ctx; - gem_context_get_param(fd, &arg); - arg.context = 2; - igt_assert_eq(__gem_context_set_param(fd, &arg), -ENOENT); - } - - igt_subtest("invalid-size-get") { - arg.context = ctx; - arg.size = 8; - gem_context_get_param(fd, &arg); - igt_assert(arg.size == 0); - } - - igt_subtest("invalid-size-set") { - arg.context = ctx; - gem_context_get_param(fd, &arg); - arg.size = 8; - igt_assert_eq(__gem_context_set_param(fd, &arg), -EINVAL); - arg.size = 0; - } - - igt_subtest("non-root-set") { - igt_fork(child, 1) { - igt_drop_root(); - - arg.context = ctx; - gem_context_get_param(fd, &arg); - arg.value--; - igt_assert_eq(__gem_context_set_param(fd, &arg), -EPERM); - } - - igt_waitchildren(); - } - - igt_subtest("root-set") { - arg.context = ctx; - gem_context_get_param(fd, &arg); - arg.value--; - gem_context_set_param(fd, &arg); - } - - arg.param = LOCAL_CONTEXT_PARAM_NO_ZEROMAP; - - igt_subtest("non-root-set-no-zeromap") { - igt_fork(child, 1) { - igt_drop_root(); - - arg.context = ctx; - gem_context_get_param(fd, &arg); - arg.value--; - gem_context_set_param(fd, &arg); - } - - igt_waitchildren(); - } - - igt_subtest("root-set-no-zeromap-enabled") { - arg.context = ctx; - gem_context_get_param(fd, &arg); - arg.value = 1; - gem_context_set_param(fd, &arg); - } - - igt_subtest("root-set-no-zeromap-disabled") { - arg.context = ctx; - gem_context_get_param(fd, &arg); - arg.value = 0; - gem_context_set_param(fd, &arg); - } - - /* 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. - */ - arg.param = LOCAL_CONTEXT_PARAM_BANNABLE + 1; - - igt_subtest("invalid-param-get") { - arg.context = ctx; - igt_assert_eq(__gem_context_get_param(fd, &arg), -EINVAL); - } - - igt_subtest("invalid-param-set") { - arg.context = ctx; - igt_assert_eq(__gem_context_set_param(fd, &arg), -EINVAL); - } - - igt_fixture - close(fd); -} diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist index bf8c1e663801..6e7683bf001e 100644 --- a/tests/intel-ci/fast-feedback.testlist +++ b/tests/intel-ci/fast-feedback.testlist @@ -28,8 +28,6 @@ igt@gem_ctx_basic igt@gem_ctx_create@basic igt@gem_ctx_create@basic-files igt@gem_ctx_exec@basic -igt@gem_ctx_param@basic -igt@gem_ctx_param@basic-default igt@gem_ctx_switch@basic-default igt@gem_ctx_switch@basic-default-heavy igt@gem_exec_basic@basic-blt diff --git a/tests/meson.build b/tests/meson.build index d2cb52c2001c..cdc3e03617c5 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -36,7 +36,6 @@ test_progs = [ 'gem_ctx_basic', 'gem_ctx_create', 'gem_ctx_exec', - 'gem_ctx_param', 'gem_ctx_switch', 'gem_ctx_thrash', 'gem_double_irq_loop',