From patchwork Fri Mar 10 14:42:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Latvala X-Patchwork-Id: 9617631 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 2D52960417 for ; Fri, 10 Mar 2017 14:43:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EC3B286E6 for ; Fri, 10 Mar 2017 14:43:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2302F2871A; Fri, 10 Mar 2017 14:43:01 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 BA17E286E6 for ; Fri, 10 Mar 2017 14:43:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 463D46EEA1; Fri, 10 Mar 2017 14:42:59 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from johanna4.inet.fi (mta-out1.inet.fi [62.71.2.203]) by gabe.freedesktop.org (Postfix) with ESMTP id A27E66EE9C for ; Fri, 10 Mar 2017 14:42:55 +0000 (UTC) RazorGate-KAS: Status: not_detected RazorGate-KAS: Rate: 0 RazorGate-KAS: Envelope from: RazorGate-KAS: Version: 5.5.3 RazorGate-KAS: LuaCore: 215 2015-05-29_17-31-22 60ae4a1b4d01d14f868b20a55aced8d7df7b2e28 RazorGate-KAS: Lua profiles 78662 [Jun 02 2015] RazorGate-KAS: Method: none Received: from hufflepuff.adrinael.net (84.250.112.128) by johanna4.inet.fi (9.0.002.03-2-gbe5d057) id 58A591A002DFB1D0; Fri, 10 Mar 2017 16:42:54 +0200 Received: from adrinael by hufflepuff.adrinael.net with local (Exim 4.84_2) (envelope-from ) id 1cmLks-0004Py-SS; Fri, 10 Mar 2017 16:42:54 +0200 From: Petri Latvala To: intel-gfx@lists.freedesktop.org Date: Fri, 10 Mar 2017 16:42:43 +0200 Message-Id: <1489156964-16931-2-git-send-email-petri.latvala@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1489156964-16931-1-git-send-email-petri.latvala@intel.com> References: <1489156964-16931-1-git-send-email-petri.latvala@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 1/2] lib: Add i915 and drm-mm selftest headers from the kernel 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 Copied as of commit commit 496b575e3ccbf6fbe57a674c721af43dc8826361 Author: Chris Wilson Date: Mon Feb 13 17:15:58 2017 +0000 drm/i915: Add initial selftests for hang detection and resets The headers are used to enumerate available tests when the running kernel does not support selftests. Signed-off-by: Petri Latvala --- lib/drm_mm_selftests.h | 24 ++++++++++++++++++++++++ lib/i915_live_selftests.h | 19 +++++++++++++++++++ lib/i915_mock_selftests.h | 20 ++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 lib/drm_mm_selftests.h create mode 100644 lib/i915_live_selftests.h create mode 100644 lib/i915_mock_selftests.h diff --git a/lib/drm_mm_selftests.h b/lib/drm_mm_selftests.h new file mode 100644 index 0000000..37bbdac --- /dev/null +++ b/lib/drm_mm_selftests.h @@ -0,0 +1,24 @@ +/* List each unit test as selftest(name, function) + * + * The name is used as both an enum and expanded as igt__name to create + * a module parameter. It must be unique and legal for a C identifier. + * + * Tests are executed in order by igt/drm_mm + */ +selftest(sanitycheck, igt_sanitycheck) /* keep first (selfcheck for igt) */ +selftest(init, igt_init) +selftest(debug, igt_debug) +selftest(reserve, igt_reserve) +selftest(insert, igt_insert) +selftest(replace, igt_replace) +selftest(insert_range, igt_insert_range) +selftest(align, igt_align) +selftest(align32, igt_align32) +selftest(align64, igt_align64) +selftest(evict, igt_evict) +selftest(evict_range, igt_evict_range) +selftest(bottomup, igt_bottomup) +selftest(topdown, igt_topdown) +selftest(color, igt_color) +selftest(color_evict, igt_color_evict) +selftest(color_evict_range, igt_color_evict_range) diff --git a/lib/i915_live_selftests.h b/lib/i915_live_selftests.h new file mode 100644 index 0000000..18b174d --- /dev/null +++ b/lib/i915_live_selftests.h @@ -0,0 +1,19 @@ +/* List each unit test as selftest(name, function) + * + * The name is used as both an enum and expanded as subtest__name to create + * a module parameter. It must be unique and legal for a C identifier. + * + * The function should be of type int function(void). It may be conditionally + * compiled using #if IS_ENABLED(DRM_I915_SELFTEST). + * + * Tests are executed in order by igt/drv_selftest + */ +selftest(sanitycheck, i915_live_sanitycheck) /* keep first (igt selfcheck) */ +selftest(uncore, intel_uncore_live_selftests) +selftest(requests, i915_gem_request_live_selftests) +selftest(objects, i915_gem_object_live_selftests) +selftest(dmabuf, i915_gem_dmabuf_live_selftests) +selftest(coherency, i915_gem_coherency_live_selftests) +selftest(gtt, i915_gem_gtt_live_selftests) +selftest(contexts, i915_gem_context_live_selftests) +selftest(hangcheck, intel_hangcheck_live_selftests) diff --git a/lib/i915_mock_selftests.h b/lib/i915_mock_selftests.h new file mode 100644 index 0000000..be9a9eb --- /dev/null +++ b/lib/i915_mock_selftests.h @@ -0,0 +1,20 @@ +/* List each unit test as selftest(name, function) + * + * The name is used as both an enum and expanded as subtest__name to create + * a module parameter. It must be unique and legal for a C identifier. + * + * The function should be of type int function(void). It may be conditionally + * compiled using #if IS_ENABLED(DRM_I915_SELFTEST). + * + * Tests are executed in order by igt/drv_selftest + */ +selftest(sanitycheck, i915_mock_sanitycheck) /* keep first (igt selfcheck) */ +selftest(scatterlist, scatterlist_mock_selftests) +selftest(uncore, intel_uncore_mock_selftests) +selftest(breadcrumbs, intel_breadcrumbs_mock_selftests) +selftest(requests, i915_gem_request_mock_selftests) +selftest(objects, i915_gem_object_mock_selftests) +selftest(dmabuf, i915_gem_dmabuf_mock_selftests) +selftest(vma, i915_vma_mock_selftests) +selftest(evict, i915_gem_evict_mock_selftests) +selftest(gtt, i915_gem_gtt_mock_selftests)