[i-g-t,5/9] tests/i915_missed_irq: Don't leave the hang detector hanging

Submitted by Daniel Vetter on Feb. 11, 2019, 6:02 p.m.

Details

Message ID 20190211180208.29406-5-daniel.vetter@ffwll.ch
State New
Series "Series without cover letter"
Headers show

Commit Message

Daniel Vetter Feb. 11, 2019, 6:02 p.m.
Spotted by my new "are there any child processes left?" check in
igt_exit - we need to put all the igt_require before we start any real
test logic.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/i915/missed_irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/i915/missed_irq.c b/tests/i915/missed_irq.c
index cade3f371401..302da0e8d071 100644
--- a/tests/i915/missed_irq.c
+++ b/tests/i915/missed_irq.c
@@ -108,13 +108,13 @@  igt_simple_main
 	igt_require_gem(device);
 	igt_skip_on(gem_has_guc_submission(device)); /* irq forced for guc */
 	gem_require_mmap_wc(device);
-	igt_fork_hang_detector(device);
-
 	debugfs = igt_debugfs_dir(device);
 
 	expect_rings = engine_mask(debugfs);
 	igt_require(expect_rings);
 
+	igt_fork_hang_detector(device);
+
 	igt_debug("Clearing rings %x\n", expect_rings);
 	intel_detect_and_clear_missed_interrupts(device);
 	for (e = intel_execution_engines; e->name; e++) {

Comments

Chris Wilson Feb. 11, 2019, 6:08 p.m.
Quoting Daniel Vetter (2019-02-11 18:02:04)
> Spotted by my new "are there any child processes left?" check in
> igt_exit - we need to put all the igt_require before we start any real
> test logic.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  tests/i915/missed_irq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/missed_irq.c b/tests/i915/missed_irq.c
> index cade3f371401..302da0e8d071 100644
> --- a/tests/i915/missed_irq.c
> +++ b/tests/i915/missed_irq.c
> @@ -108,13 +108,13 @@ igt_simple_main
>         igt_require_gem(device);
>         igt_skip_on(gem_has_guc_submission(device)); /* irq forced for guc */
>         gem_require_mmap_wc(device);
> -       igt_fork_hang_detector(device);
> -
>         debugfs = igt_debugfs_dir(device);
>  
>         expect_rings = engine_mask(debugfs);
>         igt_require(expect_rings);
>  
> +       igt_fork_hang_detector(device);

We don't really need hang detector here either, I think I might have
been a bit to quick to copy it here. Test is defunct, but
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
nevertheless.
-Chris