From mboxrd@z Thu Jan 1 00:00:00 1970 From: armin.c.reese@intel.com Subject: [PATCH] igt/gem_partial_pwrite_pread: Add set-cache subtest to validate JIRA VIZ-3721 Date: Thu, 12 Jun 2014 14:18:37 -0700 Message-ID: <1402607917-12847-1-git-send-email-armin.c.reese@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 22D9A6E1D5 for ; Thu, 12 Jun 2014 14:19:20 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Armin Reese This subtest forces the driver down the code path in i915_gem_object_set_cache_level() which unbinds VMAs and triggers the kernel panic described in VIZ-3721. This test will pass if the bug fix is in place. Bugzilla: https://bugs.fredesktop.org/show_bug.cgi?id=76384 Signed-off-by: Armin Reese --- tests/gem_partial_pwrite_pread.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c index 7945ba7..3e3ecc9 100644 --- a/tests/gem_partial_pwrite_pread.c +++ b/tests/gem_partial_pwrite_pread.c @@ -131,6 +131,14 @@ static void test_partial_reads(void) } +static void test_set_cache(void) +{ + igt_info("checking set-cache\n"); + + blt_bo_fill(staging_bo, scratch_bo, 0); + +} + static void test_partial_writes(void) { int i, j; @@ -244,6 +252,9 @@ static void do_tests(int cache_level, const char *suffix) gem_set_caching(fd, scratch_bo->handle, cache_level); } + igt_subtest_f("set-cache%s", suffix) + test_set_cache(); + igt_subtest_f("reads%s", suffix) test_partial_reads(); -- 1.9.1