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

Cyril Hrubis chrubis@suse.cz
Thu Jan 21 17:25:32 CET 2021


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?



Other than that this version looks good,

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

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list