[Intel-gfx] [PATCH] igt/gem_partial_pwrite_pread: Add set-cache subtest to validate JIRA VIZ-3721

Reese, Armin C armin.c.reese at intel.com
Fri Jul 11 19:55:41 CEST 2014


Which of the I-G-Ts would be the best to house the set-cache subtest?  Is gem_partial_pwrite_pread a good candidate?
- Armin

-----Original Message-----
From: Daniel Vetter [mailto:daniel.vetter at ffwll.ch] On Behalf Of Daniel Vetter
Sent: Friday, June 13, 2014 12:14 AM
To: Reese, Armin C
Cc: intel-gfx at lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] igt/gem_partial_pwrite_pread: Add set-cache subtest to validate JIRA VIZ-3721

On Thu, Jun 12, 2014 at 02:18:37PM -0700, armin.c.reese at intel.com wrote:
> From: Armin Reese <armin.c.reese at intel.com>
> 
> 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 <armin.c.reese at intel.com>
> ---
>  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);
> +
> +}

Ok, my apologies for the unclear JIRA description. My idea was to have a tailor-made testcase with a minimal reproduction scenario (i.e. map into 2 ppgtt or ggtt + ppgtt, then do a set_caching ioctl).

This here blows up because we do the set_caching as part of the fixture, so has a high risk that when someone decides to refactor the testcase we'll no longer test this bug. Hence the task to create a new, specific testcase.
-Daniel

> +
>  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
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list