[LTP] [PATCH 2/4] lib: Add .modprobe

Petr Vorel pvorel@suse.cz
Fri Nov 3 16:22:05 CET 2023


Hi Cyril,

> Hi!
> > > What about renaming it as tst_module_is_loaded() and move into tst_kernel.h?
> > > I guess we could make use of it widely for checking module loading or not.

> > I can do that, but lib/tst_kernel.c uses the old API. I guess it would fit
> > better in lib/tst_module.c, but that also uses the old API. Most of the tests
> > are converted, but at least these modules are still in the old API and use
> > tst_module_load from tst_module.h:

> > IMHO We need another file, which would be new API only. I'm also not sure if
> > it's a good idea to put another file with just single function to it. We already
> > have 38 lib/tst_*.c files which use new API. Any tip, what to use?
> > Or should I really put it into lib/tst_module.c ain include/tst_module.h, but
> > not into include/old/old_module.h (as we want old tests to be converted first?).

> I would just put the new functions into tst_module.h and we can put the
> into tst_module_new.c in lib/ and move the function to tst_module.c once
> the tst_module.c has been converted to new API.

+1. IMHO some other functions from lib/tst_kernel.c should be moved there
(tst_search_driver(), tst_check_builtin_driver(), tst_check_driver()).

> > > And here print the name to tell people the module is loaded.
> > +1

...
Thanks for your input.

Kind regards,
Petr


More information about the ltp mailing list