[LTP] [PATCH v4 1/3] lib: Fix kernel module detection on BusyBox

Petr Vorel pvorel@suse.cz
Thu Jan 21 17:40:04 CET 2021


Hi,

> Hi!
> > +int tst_check_driver(const char *driver)
> > +{
> > +#ifdef __ANDROID__
> > +	/*
> > +	 * Android may not have properly installed modules.* files. We could
> > +	 * search modules in /system/lib/modules, but to to determine built-in
> > +	 * drivers we need modules.builtin. Therefore assume all drivers are
> > +	 * available.
> >  	 */
> >  	return 0;
> >  #endif
> > +
> > +	if (!tst_check_driver_(driver))
> > +		return 0;
> > +
> > +	int ret = 1;

> One last nit, shouldn't this be -1?

> Since the tst_check_driver_() returns either 0 or -1.

> Or should we change tst_check_driver_() to return 0 or 1 instead?

Oops, yes the value should be the same.
I prefer -1 as that's error in syscalls, but no strong opinion about it.

> Other than that this version looks good,

> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

Thanks a lot for your patient review!

Kind regards,
Petr


More information about the ltp mailing list