[igt-dev] [PATCH i-g-t] tests/i915_module_load: Use new name of fault injection module parameter

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 29 13:39:38 UTC 2019


Quoting Janusz Krzysztofik (2019-10-29 13:35:48)
> > diff --git a/tests/i915/i915_module_load.c b/tests/i915/i915_module_load.c
> > index f42083f53..7d9a5cfd2 100644
> > --- a/tests/i915/i915_module_load.c
> > +++ b/tests/i915/i915_module_load.c
> > @@ -350,11 +350,17 @@ igt_main
> >       }
> >  
> >       igt_subtest("reload-with-fault-injection") {
> > +             const char *param;
> >               int i = 0;
> >  
> >               igt_i915_driver_unload();
> >  
> > -             while (inject_fault("i915", "inject_load_failure", +
> +i) == 0)
> > +             param = "inject_probe_failure";
> > +             if (!igt_kmod_has_param("i915", param))
> > +                     param = "inject_load_failure";
> > +             igt_require(igt_kmod_has_param("i915", param));
> > +
> > +             while (inject_fault("i915", param, ++i) == 0)
> >                       ;
> 
> My first thought was to just retry the loop with the old parameter name if the 
> new one fails but I'm OK with your approach (maybe there will be other users 
> of the new library helper).  In case R-b is needed, please tell me.

I first did the repeated loop as well. I thought people might object to
that as being a little too hacky :)

There's a few more places were we might want to use param probing --
currently we try and ignore modparams as ABI as much as possible!
-Chris


More information about the igt-dev mailing list