[Intel-gfx] [PATCH i-g-t] tests/drv_selftest: Allow passing in module options from the command line

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 20 18:20:11 UTC 2018


Quoting Chris Wilson (2018-11-20 18:16:53)
> Quoting Tvrtko Ursulin (2018-11-20 18:07:57)
> > From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> > 
> > A new option '--kmod-options' is added which takes a string which will be
> > passed to modprobe when loading the module.
> > 
> > This for instance allows easy override of things like the random seed when
> > trying to reproduce failures.
>  
> Anyway we can simply extend the option parsing locally? (Just find it
> unsightly to have test specific options in libigt.)
> 
> Stashing argc/argv in igt_subtest_init_parse_opts() and then being able
> to run getopts inside igt_main {}?

Or perhaps,

#define igt_main_argv \
        static void igt_tokencat(__real_main, __LINE__)(int argc, char **argv); \
        int main(int argc, char **argv) { \
                igt_subtest_init_parse_opts(&argc, argv, NULL, NULL, NULL, \
                                            NULL, NULL); \
                igt_tokencat(__real_main, __LINE__)(argc, char **argv); \
                igt_exit(); \
        } \
        static void igt_tokencat(__real_main, __LINE__)(int argc, char **argv) \


More information about the Intel-gfx mailing list