diff mbox

[i-g-t] tests/gem_close_race: Add igt_fixture block for igt_stop_hang_detector.

Message ID 1461681059-11811-1-git-send-email-marius.c.vlad@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Marius Vlad April 26, 2016, 2:30 p.m. UTC
igt_fork_hang_detector() was called from a igt_fixture block, while its
counterpart (igt_stop_hang_detector) was called normally, causing
SIGTERM to be sent when running under check target.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 tests/gem_close_race.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Daniel Vetter April 26, 2016, 2:34 p.m. UTC | #1
On Tue, Apr 26, 2016 at 05:30:59PM +0300, Marius Vlad wrote:
> igt_fork_hang_detector() was called from a igt_fixture block, while its
> counterpart (igt_stop_hang_detector) was called normally, causing
> SIGTERM to be sent when running under check target.
> 
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>


> ---
>  tests/gem_close_race.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c
> index 54e8b89..1c97076 100644
> --- a/tests/gem_close_race.c
> +++ b/tests/gem_close_race.c
> @@ -243,5 +243,6 @@ igt_main
>  	igt_subtest("gem-close-race")
>  		threads(150);
>  
> -	igt_stop_hang_detector();
> +	igt_fixture
> +	    igt_stop_hang_detector();
>  }
> -- 
> 2.8.0.rc3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson April 26, 2016, 2:35 p.m. UTC | #2
On Tue, Apr 26, 2016 at 05:30:59PM +0300, Marius Vlad wrote:
> igt_fork_hang_detector() was called from a igt_fixture block, while its
> counterpart (igt_stop_hang_detector) was called normally, causing
> SIGTERM to be sent when running under check target.

Probably. Or make igt_stop_hang_detector() more sensible after an
earlier failure. Or both!
 
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>

From the point of view of balance, go for it!
-Chris
diff mbox

Patch

diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c
index 54e8b89..1c97076 100644
--- a/tests/gem_close_race.c
+++ b/tests/gem_close_race.c
@@ -243,5 +243,6 @@  igt_main
 	igt_subtest("gem-close-race")
 		threads(150);
 
-	igt_stop_hang_detector();
+	igt_fixture
+	    igt_stop_hang_detector();
 }