[i-g-t] i915/gem_exec_reuse: stop the hang detector afterwards

Submitted by Chris Wilson on Feb. 11, 2019, 5:52 p.m.

Details

Message ID 20190211175242.722-1-chris@chris-wilson.co.uk
State New
Series "i915/gem_exec_reuse: stop the hang detector afterwards"
Headers show

Commit Message

Chris Wilson Feb. 11, 2019, 5:52 p.m.
Take responsibility for the state we create, and in particular remember
to kill our child process (the hang detector) before exiting.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_exec_reuse.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tests/i915/gem_exec_reuse.c b/tests/i915/gem_exec_reuse.c
index df220be7b..44946528f 100644
--- a/tests/i915/gem_exec_reuse.c
+++ b/tests/i915/gem_exec_reuse.c
@@ -116,7 +116,7 @@  static unsigned int max_nfd(void)
 
 igt_main
 {
-	struct noop no;
+	struct noop no = { .fd = -1 };
 	unsigned engines[16];
 	unsigned nengine;
 	unsigned n;
@@ -213,4 +213,7 @@  igt_main
 		for (n = 0; n < ncontexts; n++)
 			gem_context_destroy(no.fd, contexts[n]);
 	}
+
+	igt_fixture
+		igt_stop_hang_detector(no.fd);
 }

Comments

Antonio Argenziano Feb. 11, 2019, 6:34 p.m.
On 11/02/19 09:52, Chris Wilson wrote:
> Take responsibility for the state we create, and in particular remember
> to kill our child process (the hang detector) before exiting.
> 
> Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>   tests/i915/gem_exec_reuse.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/i915/gem_exec_reuse.c b/tests/i915/gem_exec_reuse.c
> index df220be7b..44946528f 100644
> --- a/tests/i915/gem_exec_reuse.c
> +++ b/tests/i915/gem_exec_reuse.c
> @@ -116,7 +116,7 @@ static unsigned int max_nfd(void)
>   
>   igt_main
>   {
> -	struct noop no;
> +	struct noop no = { .fd = -1 };
>   	unsigned engines[16];
>   	unsigned nengine;
>   	unsigned n;
> @@ -213,4 +213,7 @@ igt_main
>   		for (n = 0; n < ncontexts; n++)
>   			gem_context_destroy(no.fd, contexts[n]);
>   	}
> +
> +	igt_fixture
> +		igt_stop_hang_detector(no.fd);

This doesn't take an fd... incoming changes to the lib?

Still makes sense, with fix,

Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>

>   }
>