diff mbox

[igt] igt/gem_ringfill: Add exercising the default-ring to basic testing

Message ID 1453983536-31548-1-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Jan. 28, 2016, 12:18 p.m. UTC
ringfill generates a few very common errors when submitting requests,
and historically these have been where we have had many implementation
bugs, repeated over and over again.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_ringfill.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

Comments

Ben Duckworth Feb. 19, 2016, 12:47 p.m. UTC | #1
On 28/01/2016 12:18, Chris Wilson wrote:
> ringfill generates a few very common errors when submitting requests,
> and historically these have been where we have had many implementation
> bugs, repeated over and over again.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/gem_ringfill.c | 21 +++++++++------------
>   1 file changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
> index bd1f371..f81a70b 100644
> --- a/tests/gem_ringfill.c
> +++ b/tests/gem_ringfill.c
> @@ -189,30 +189,27 @@ static void run_test(int fd, unsigned ring, unsigned flags)
>   igt_main
>   {
>   	const struct {
> -		const char *prefix;
>   		const char *suffix;
>   		unsigned flags;
>   	} modes[] = {
> -		{ "basic-", "", 0 },
> -		{ "", "-interruptible", INTERRUPTIBLE },
> -		{ "", "-hang", HANG },
> -		{ "", "-child", CHILD },
> -		{ "", "-forked", FORKED },
> -		{ "", "-bomb", BOMB | INTERRUPTIBLE },
> -		{ NULL, NULL, 0 }
> +		{ "", 0 },
> +		{ "-interruptible", INTERRUPTIBLE },
> +		{ "-hang", HANG },
> +		{ "-child", CHILD },
> +		{ "-forked", FORKED },
> +		{ "-bomb", BOMB | INTERRUPTIBLE },
> +		{ NULL, 0 }
>   	}, *mode;
>   	const struct intel_execution_engine *e;
>   	int fd;
>   
> -	igt_skip_on_simulation();
> -
Why was the test changed to no longer skip on the simulation ?
Currently reset is not modeled so this leads to a test hang in the 
render_hang subtest.
>   	igt_fixture
>   		fd = drm_open_driver_master(DRIVER_INTEL);
>   
> -	for (mode = modes; mode->prefix; mode++) {
> +	for (mode = modes; mode->suffix; mode++) {
>   		for (e = intel_execution_engines; e->name; e++) {
>   			igt_subtest_f("%s%s%s",
> -				      e->exec_id || (mode->flags & ~INTERRUPTIBLE) ? "" : mode->prefix,
> +				      e->exec_id ? "" : "basic-",
>   				      e->name,
>   				      mode->suffix)
>   				run_test(fd, e->exec_id | e->flags, mode->flags);
Chris Wilson Feb. 19, 2016, 12:55 p.m. UTC | #2
On Fri, Feb 19, 2016 at 12:47:21PM +0000, Ben Duckworth wrote:
> 
> 
> On 28/01/2016 12:18, Chris Wilson wrote:
> >ringfill generates a few very common errors when submitting requests,
> >and historically these have been where we have had many implementation
> >bugs, repeated over and over again.
> >
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >---
> >  tests/gem_ringfill.c | 21 +++++++++------------
> >  1 file changed, 9 insertions(+), 12 deletions(-)
> >
> >diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
> >index bd1f371..f81a70b 100644
> >--- a/tests/gem_ringfill.c
> >+++ b/tests/gem_ringfill.c
> >@@ -189,30 +189,27 @@ static void run_test(int fd, unsigned ring, unsigned flags)
> >  igt_main
> >  {
> >  	const struct {
> >-		const char *prefix;
> >  		const char *suffix;
> >  		unsigned flags;
> >  	} modes[] = {
> >-		{ "basic-", "", 0 },
> >-		{ "", "-interruptible", INTERRUPTIBLE },
> >-		{ "", "-hang", HANG },
> >-		{ "", "-child", CHILD },
> >-		{ "", "-forked", FORKED },
> >-		{ "", "-bomb", BOMB | INTERRUPTIBLE },
> >-		{ NULL, NULL, 0 }
> >+		{ "", 0 },
> >+		{ "-interruptible", INTERRUPTIBLE },
> >+		{ "-hang", HANG },
> >+		{ "-child", CHILD },
> >+		{ "-forked", FORKED },
> >+		{ "-bomb", BOMB | INTERRUPTIBLE },
> >+		{ NULL, 0 }
> >  	}, *mode;
> >  	const struct intel_execution_engine *e;
> >  	int fd;
> >-	igt_skip_on_simulation();
> >-
> Why was the test changed to no longer skip on the simulation ?

Because it is a fundamental test of the driver that often has bugs in
bringup that should have been rooted out before power on.

> Currently reset is not modeled so this leads to a test hang in the
> render_hang subtest.

So send a patch to igt_require_hang_ring() and document it.
-Chris
diff mbox

Patch

diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index bd1f371..f81a70b 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -189,30 +189,27 @@  static void run_test(int fd, unsigned ring, unsigned flags)
 igt_main
 {
 	const struct {
-		const char *prefix;
 		const char *suffix;
 		unsigned flags;
 	} modes[] = {
-		{ "basic-", "", 0 },
-		{ "", "-interruptible", INTERRUPTIBLE },
-		{ "", "-hang", HANG },
-		{ "", "-child", CHILD },
-		{ "", "-forked", FORKED },
-		{ "", "-bomb", BOMB | INTERRUPTIBLE },
-		{ NULL, NULL, 0 }
+		{ "", 0 },
+		{ "-interruptible", INTERRUPTIBLE },
+		{ "-hang", HANG },
+		{ "-child", CHILD },
+		{ "-forked", FORKED },
+		{ "-bomb", BOMB | INTERRUPTIBLE },
+		{ NULL, 0 }
 	}, *mode;
 	const struct intel_execution_engine *e;
 	int fd;
 
-	igt_skip_on_simulation();
-
 	igt_fixture
 		fd = drm_open_driver_master(DRIVER_INTEL);
 
-	for (mode = modes; mode->prefix; mode++) {
+	for (mode = modes; mode->suffix; mode++) {
 		for (e = intel_execution_engines; e->name; e++) {
 			igt_subtest_f("%s%s%s",
-				      e->exec_id || (mode->flags & ~INTERRUPTIBLE) ? "" : mode->prefix,
+				      e->exec_id ? "" : "basic-",
 				      e->name,
 				      mode->suffix)
 				run_test(fd, e->exec_id | e->flags, mode->flags);