[igt-dev] [PATCH v5 2/2] tests/core_hot_reload: Accept external workload

Katarzyna Dec katarzyna.dec at intel.com
Fri Apr 12 08:23:22 UTC 2019


On Wed, Apr 10, 2019 at 11:14:46AM +0200, Janusz Krzysztofik wrote:
> On Tuesday, April 9, 2019 4:56:36 PM CEST Katarzyna Dec wrote:
> > On Tue, Apr 09, 2019 at 01:10:59PM +0200, Janusz Krzysztofik wrote:
> > > From: Janusz Krzysztofik <janusz.krzysztofik at intel.com>
> > > 
> > > Run a user specified command, possibly one of existing tests, in
> > > background instead of the default dummy load to put some alternative
> > > workload on a device while trying to either remove (unplug) the device
> > > from its bus, or unbind the device's driver from it, depending on which
> > > subtest has been selected.
> > > 
> > > The command selected as the alternative workload should make real use of
> > > the device as much as possible and its execution should take
> > > significantly more than 2 seconds in order to get reliable results from
> > > the test.
> > > 
> > > Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at intel.com>
> > > ---
> > > 
> > >  tests/core_hot_reload.c | 51 +++++++++++++++++++++++++++++++++++++++--
> > >  1 file changed, 49 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/tests/core_hot_reload.c b/tests/core_hot_reload.c
> > > index d862c99c..0d0795dc 100644
> > > --- a/tests/core_hot_reload.c
> > > +++ b/tests/core_hot_reload.c
> > > @@ -33,6 +33,9 @@
> > > 
> > >  #include <unistd.h>
> > > 
> > > +#define OPT_WORKLOAD_CMD	'c'
> > > +
> > > +
> > > 
> > >  typedef int (*action_t)(int dir);
> > >  typedef void (*workload_wait_t)(void *priv);
> > >  typedef void (*workload_t)(int device, const void *priv);
> > > 
> > > @@ -108,6 +111,16 @@ static void spin_batch(int device, const void *priv)
> > > 
> > >  	igt_spin_batch_free(device, spin);
> > >  
> > >  }
> > > 
> > > +/* Workload using external command */
> > 
> > Can you provide examples of such commands?
> 
> One particular test I was able to get a kernel panic with while removing the 
> device on the fly was:
> 
>     gem_exec_nop --run-subtest basic-range
> 
> Run from my test, it looks like that:
> 
>     core_hot_reload --run-subtest unplug --workload-cmd "gem_exec_nop --run-
> subtest basic-range"
> 
Now I see how it is supposed to work. This example or similar should be at least
a part of commit msg, ideally also reflected in binary. As you see it is not
obvious what kind of workloads we can use.
I saw that you already send v7, please fix that and hopefully we will be able to
have v8 final version.

btw - you can always answer review question or clarify sth on irc :)

Sorry for responding so late.
Kasia :)


More information about the igt-dev mailing list