[igt-dev] [PATCH i-g-t] igt/drv_module_reload: Don't reload on exit

Chris Wilson chris at chris-wilson.co.uk
Fri Jul 27 09:45:39 UTC 2018


Quoting Petri Latvala (2018-07-27 10:23:28)
> > diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c
> > index 34f55eab1..4c06e4caf 100644
> > --- a/tests/drv_module_reload.c
> > +++ b/tests/drv_module_reload.c
> > @@ -340,21 +340,21 @@ hda_dynamic_debug(bool enable)
> >  
> >  igt_main
> >  {
> > -     int err;
> > -
> > -     igt_fixture
> > +     igt_subtest("basic-reload") {
> >               hda_dynamic_debug(true);
> >  
> > -     igt_subtest("basic-reload") {
> > -             if ((err = reload(NULL)))
> > -                     igt_fail(err);
> > +             igt_assert_eq(reload(NULL), 0);
> >  
> >               gem_sanitycheck();
> >               gem_exec_store();
> > +
> > +             hda_dynamic_debug(false);
> >       }
> 
> 
> hda_dynamic_debug is no longer active for other subtests then. Is it
> not useful for them?

Tbh, not sure what value hda_dynamic_debug provides. My presumption was
that it helps show the module ordering on load, in which case we do only
need it once around the basic reload. The purpose of the other tests is
not so much checking the ordinary module load but to investigate other
side-effects. Since it is not the purpose of the other tests to debug
hda, I'd rather not have any extra noise.

> > -     igt_subtest("basic-no-display")
> > +     igt_subtest("basic-no-display") {
> >               igt_assert_eq(reload("disable_display=1"), 0);
> > +             igt_i915_driver_unload();
> > +     }
> >  
> >       igt_subtest("basic-reload-inject") {
> >               int i = 0;
> > @@ -367,13 +367,4 @@ igt_main
> >               /* We expect to hit at least one fault! */
> >               igt_assert(i > 1);
> 
> 
> Tautological assert here btw.

Is it? If inject_load() breaks on the first iteration (no module, or no
fault injection modparam), i is left at 1.
-Chris


More information about the igt-dev mailing list