All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] i915/gem_mmap_gtt: added description for test case
Date: Tue, 28 Jun 2022 13:58:40 +0200	[thread overview]
Message-ID: <Yrrs8AXu5UHyBsRY@kamilkon-desk1> (raw)
In-Reply-To: <20220628080054.1655626-2-priyanka.dandamudi@intel.com>

On 2022-06-28 at 13:30:53 +0530, priyanka.dandamudi@intel.com wrote:
> From: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
> 
> Added global description and subtest descriptions.
> 
> v2:Minor corrections.
> 
> v3: Added descriptions to copy subtests.
> 
> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com>

Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>

> ---
>  tests/i915/gem_mmap_gtt.c | 81 +++++++++++++++++++++++++++++++++++----
>  1 file changed, 73 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> index 6db82229..e39b9047 100644
> --- a/tests/i915/gem_mmap_gtt.c
> +++ b/tests/i915/gem_mmap_gtt.c
> @@ -54,6 +54,8 @@
>  
>  #define abs(x) ((x) >= 0 ? (x) : -(x))
>  
> +IGT_TEST_DESCRIPTION("Ensure that all operations around MMAP_GTT ioctl works.");
> +
>  static int OBJECT_SIZE = 16*1024*1024;
>  
>  static void
> @@ -1272,6 +1274,7 @@ igt_main
>  		gem_require_mappable_ggtt(fd);
>  	}
>  
> +	igt_describe("Verify mapping to invalid gem objects fails.");
>  	igt_subtest("bad-object") {
>  		uint32_t real_handle = gem_create(fd, 4096);
>  		uint32_t handles[20];
> @@ -1293,77 +1296,126 @@ igt_main
>  		gem_close(fd, real_handle);
>  	}
>  
> +	igt_describe("Basic checks of GEM_MMAP_GTT ioctl.");
>  	igt_subtest("basic")
>  		test_access(fd);
> +	igt_describe("Test mmaping less than the full object.");
>  	igt_subtest("basic-short")
>  		test_short(fd);
> +	igt_describe("Test copy between two GTT mmappings.");
>  	igt_subtest("basic-copy")
>  		test_copy(fd);
> +	igt_describe("Test to read content from GTT mmapped object.");
>  	igt_subtest("basic-read")
>  		test_read(fd);
> +	igt_describe("Test to write content to GTT mmapped object.");
>  	igt_subtest("basic-write")
>  		test_write(fd);
> +	igt_describe("Test creates a prefault object into GTT and "
> +		     "writes into it from another GTT mmapped.");
>  	igt_subtest("basic-write-gtt")
>  		test_write_gtt(fd);
> +	igt_describe("Inspect a GTT mmap using ptrace().");
>  	igt_subtest("ptrace")
>  		test_ptrace(fd);
> +	igt_describe("Check whether a write through the GTT is immediately visible to the CPU.");
>  	igt_subtest("coherency")
>  		test_coherency(fd);
> +	igt_describe("Check the userspace clflushing of the GTT mmap.");
>  	igt_subtest("clflush")
>  		test_clflush(fd);
> +	igt_describe("Check read/writes across a GPU reset.");
>  	igt_subtest("hang")
>  		test_hang(fd);
> +	igt_describe("Exercise the GTT mmap revocation for a reset on a busy object.");
>  	igt_subtest("hang-busy")
>  		test_hang_busy(fd);
> +	igt_describe("Mix a busy hang with GTT and userptr.");
>  	igt_subtest("hang-user")
>  		test_hang_user(fd);
> +	igt_describe("Check basic read->write order of a GTT mmapped bo.");
>  	igt_subtest("basic-read-write")
>  		test_read_write(fd, READ_BEFORE_WRITE);
> +	igt_describe("Check basic write->read order of a GTT mmapped bo.");
>  	igt_subtest("basic-write-read")
>  		test_read_write(fd, READ_AFTER_WRITE);
> +	igt_describe("Check distinct read->write order of a GTT mmapped bo.");
>  	igt_subtest("basic-read-write-distinct")
>  		test_read_write2(fd, READ_BEFORE_WRITE);
> +	igt_describe("Check distinct write->read order of a GTT mmapped bo.");
>  	igt_subtest("basic-write-read-distinct")
>  		test_read_write2(fd, READ_AFTER_WRITE);
> +	igt_describe("Excercise concurrent pagefaulting of a GTT mmaped bo.");
>  	igt_subtest("fault-concurrent")
>  		test_fault_concurrent(fd, I915_TILING_NONE);
> +	igt_describe("Excercise concurrent pagefaulting of a X-tiled GTT mmaped bo.");
>  	igt_subtest("fault-concurrent-X")
>  		test_fault_concurrent(fd, I915_TILING_X);
> +	igt_describe("Excercise concurrent pagefaulting of a Y-tiled GTT mmaped bo.");
>  	igt_subtest("fault-concurrent-Y")
>  		test_fault_concurrent(fd, I915_TILING_Y);
> +	igt_describe("Check coherency between GTT and CPU mmappings with LLC.");
>  	igt_subtest("basic-write-cpu-read-gtt")
>  		test_write_cpu_read_gtt(fd);
> +	igt_describe("Check the performance of WC writes with WC reads of GTT "
> +		     "and WC writes of GTT with WB writes of CPU.");
>  	igt_subtest("basic-wc")
>  		test_wc(fd);
> +	igt_describe("Test mmap_offset lifetime, closing the object on"
> +		     " another file should not affect the local mmap_offset.");
>  	igt_subtest("isolation")
>  		test_isolation(fd);
> +	igt_describe("Test MMAP_GTT extension validity.");
>  	igt_subtest("zero-extend")
>  		test_zero_extend(fd);
> +	igt_describe("Test to check that a few threads opening and closing handles"
> +		     " cause explosion in other threads in the process of mmaping that handle.");
>  	igt_subtest("close-race")
>  		test_close_race(fd);
> +	igt_describe("Test to check that a few threads opening and closing flink handles"
> +		     " cause explosion in other threads in the process of mmaping that handle.");
>  	igt_subtest("flink-race")
>  		test_flink_race(fd);
> +	igt_describe("Check that the initial pagefault is non-blocking.");
>  	igt_subtest("pf-nonblock")
>  		test_pf_nonblock(fd);
>  
> +	igt_describe("Check mmap access to a small buffer object by CPU directly"
> +		     " and through GTT in sequence.");
>  	igt_subtest("basic-small-bo")
>  		test_huge_bo(fd, -1, I915_TILING_NONE);
> +	igt_describe("Check mmap access to a small X-tiled buffer object by CPU "
> +		     "directly and through GTT in sequence.");
>  	igt_subtest("basic-small-bo-tiledX")
>  		test_huge_bo(fd, -1, I915_TILING_X);
> +	igt_describe("Check mmap access to a small Y-tiled buffer object by CPU "
> +		     "directly and through GTT in sequence.");
>  	igt_subtest("basic-small-bo-tiledY")
>  		test_huge_bo(fd, -1, I915_TILING_Y);
>  
> +	igt_describe("Check mmap access to a big buffer object by CPU directly "
> +		     "and through GTT in sequence.");
>  	igt_subtest("big-bo")
>  		test_huge_bo(fd, 0, I915_TILING_NONE);
> +	igt_describe("Check mmap access to a big X-tiled buffer object by CPU "
> +		     "directly and through GTT in sequence.");
>  	igt_subtest("big-bo-tiledX")
>  		test_huge_bo(fd, 0, I915_TILING_X);
> +	igt_describe("Check mmap access to a big Y-tiled buffer object by CPU "
> +		     "directly and through GTT in sequence.");
>  	igt_subtest("big-bo-tiledY")
>  		test_huge_bo(fd, 0, I915_TILING_Y);
>  
> +	igt_describe("Check mmap access to a huge buffer object by CPU directly "
> +		     "and through GTT in sequence.");
>  	igt_subtest("huge-bo")
>  		test_huge_bo(fd, 1, I915_TILING_NONE);
> +	igt_describe("Check mmap access to a huge X-tiled buffer object by CPU "
> +		     "directly and through GTT in sequence.");
>  	igt_subtest("huge-bo-tiledX")
>  		test_huge_bo(fd, 1, I915_TILING_X);
> +	igt_describe("Check mmap access to a huge Y-tiled buffer object by CPU "
> +		     "directly and through GTT in sequence.");
>  	igt_subtest("huge-bo-tiledY")
>  		test_huge_bo(fd, 1, I915_TILING_Y);
>  
> @@ -1371,27 +1423,33 @@ igt_main
>  		const struct copy_size {
>  			const char *prefix;
>  			int size;
> +			const char *description;
>  		} copy_sizes[] = {
> -			{ "basic-small", -2 },
> -			{ "medium", -1 },
> -			{ "big", 0 },
> -			{ "huge", 1 },
> -			{ "swap", 2 },
> +			{ "basic-small", -2, "small bo's." },
> +			{ "medium", -1, "medium bo's." },
> +			{ "big", 0, "big bo's." },
> +			{ "huge", 1, "huge bo's." },
> +			{ "swap", 2, "huge bo's larger than physical memory"
> +				     " and resulting in thrashing of swap space." },
>  			{ }
>  		};
>  		const struct copy_mode {
>  			const char *suffix;
>  			int tiling_x, tiling_y;
> +			const char *description;
>  		} copy_modes[] = {
> -			{ "", I915_TILING_NONE, I915_TILING_NONE},
> -			{ "-XY", I915_TILING_X, I915_TILING_Y},
> -			{ "-odd", -I915_TILING_X, -I915_TILING_Y},
> +			{ "", I915_TILING_NONE, I915_TILING_NONE, "normal"},
> +			{ "-XY", I915_TILING_X, I915_TILING_Y, "tiled"},
> +			{ "-odd", -I915_TILING_X, -I915_TILING_Y, "odd tiled"},
>  			{}
>  		};
>  		const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
>  
>  		for (const struct copy_size *s = copy_sizes; s->prefix; s++)
>  			for (const struct copy_mode *m = copy_modes; m->suffix; m++) {
> +				igt_describe_f("Check page by page copying between two GTT"
> +					       " mmapped %s-%s", m->description,
> +					       s->description);
>  				igt_subtest_f("%s-copy%s", s->prefix, m->suffix)
>  					test_huge_copy(fd,
>  						       s->size,
> @@ -1399,6 +1457,10 @@ igt_main
>  						       m->tiling_y,
>  						       1);
>  
> +				igt_describe_f("Add forked contention with lighter variant"
> +					       " (single cpu) and check page by page copying"
> +					       " between two GTT mmapped %s-%s",
> +					       m->description, s->description);
>  				igt_subtest_f("cpuset-%s-copy%s", s->prefix, m->suffix) {
>  					cpu_set_t cpu, old;
>  
> @@ -1416,6 +1478,9 @@ igt_main
>  					igt_assert(sched_setaffinity(0, sizeof(old), &old) == 0);
>  				}
>  
> +				igt_describe_f("Add forked contention and check page by page"
> +					       " copying between two GTT mmapped %s-%s",
> +					       m->description, s->description);
>  				igt_subtest_f("forked-%s-copy%s", s->prefix, m->suffix)
>  					test_huge_copy(fd,
>  						       s->size,
> -- 
> 2.25.1
> 

  reply	other threads:[~2022-06-28 11:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28  8:00 [igt-dev] [PATCH i-g-t 0/2] HAX add description to gem_mmap_gtt priyanka.dandamudi
2022-06-28  8:00 ` [igt-dev] [PATCH i-g-t 1/2] i915/gem_mmap_gtt: added description for test case priyanka.dandamudi
2022-06-28 11:58   ` Kamil Konieczny [this message]
2022-06-28  8:00 ` [igt-dev] [PATCH i-g-t 2/2] HAX: don't do full run priyanka.dandamudi
2022-06-28  9:12 ` [igt-dev] ✗ Fi.CI.BAT: failure for HAX add description to gem_mmap_gtt Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2022-06-25  4:25 [igt-dev] [PATCH i-g-t 0/2] " priyanka.dandamudi
2022-06-25  4:25 ` [igt-dev] [PATCH i-g-t 1/2] i915/gem_mmap_gtt: added description for test case priyanka.dandamudi
2022-06-27 13:54   ` Kamil Konieczny
2022-06-17 12:10 [igt-dev] [PATCH i-g-t 0/2] HAX add description to gem_mmap_gtt priyanka.dandamudi
2022-06-17 12:10 ` [igt-dev] [PATCH i-g-t 1/2] i915/gem_mmap_gtt: added description for test case priyanka.dandamudi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yrrs8AXu5UHyBsRY@kamilkon-desk1 \
    --to=kamil.konieczny@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.