[PATCH i-g-t] tests/intel/xe_wedged: Force a rebind before exit

Cavitt, Jonathan jonathan.cavitt at intel.com
Wed May 15 21:02:31 UTC 2024


-----Original Message-----
From: Cavitt, Jonathan 
Sent: Wednesday, May 15, 2024 12:08 PM
To: Rodrigo Vivi <rodrigo.vivi at intel.com>; igt-dev at lists.freedesktop.org; Cavitt, Jonathan <jonathan.cavitt at intel.com>
Cc: Vivi, Rodrigo <rodrigo.vivi at intel.com>; De Marchi, Lucas <lucas.demarchi at intel.com>
Subject: RE: [PATCH i-g-t] tests/intel/xe_wedged: Force a rebind before exit
> 
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Rodrigo Vivi
> Sent: Wednesday, May 15, 2024 8:16 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Vivi, Rodrigo <rodrigo.vivi at intel.com>; De Marchi, Lucas <lucas.demarchi at intel.com>
> Subject: [PATCH i-g-t] tests/intel/xe_wedged: Force a rebind before exit
> > 
> > If the tests failed before the rebind, the device will be
> > left in the wedged mode state, blocking subsequent tests.
> > 
> > Do an extra rebind before exiting to ensure everything is clean.
> > 
> > Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > ---
> >  tests/intel/xe_wedged.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/tests/intel/xe_wedged.c b/tests/intel/xe_wedged.c
> > index b9bd49fad..cff91077c 100644
> > --- a/tests/intel/xe_wedged.c
> > +++ b/tests/intel/xe_wedged.c
> > @@ -276,6 +276,10 @@ igt_main
> >  			igt_debugfs_write(fd, "fail_gt_reset/probability", "0");
> >  			igt_debugfs_write(fd, "fail_gt_reset/times", "1");
> >  		}
> > +
> > +		/* Tests might have failed, force a rebind before exiting */
> > +		fd = rebind_xe(fd);
> 
> It might be better to only perform the rebind if the test fails,
> but on a cursory inspection, it seems doing so would require
> a rather serious change to how we monitor the assertions for
> the tests.
> 
> There's no harm in forcing a rebind on test end either way,
> so this change is fine as-is IMO:
> Acked-by: Jonathan Cavitt <jonathan.cavitt at intel.com>

On further consideration
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt

> -Jonathan Cavitt
> 
> > +
> >  		drm_close_driver(fd);
> >  	}
> >  }
> > -- 
> > 2.44.0
> > 
> > 
> 


More information about the igt-dev mailing list