[LTP] [PATCH 04/17] lib: tst_kconfig: Add module presence checks

Petr Vorel pvorel@suse.cz
Tue Apr 21 13:04:06 CEST 2026


Hi Cyril, Li,

...
> +		if (tst_check_module_driver(module_checks[i].module_name)) {
> +			tst_res(TINFO, "%s=%c present but module '%s' not installed",
> +					var->id, var->choice, module_checks[i].module_name);
> +			var->choice = 'n';

I would consider having defines for 'y', 'm', 'n' to avoid typos.
OTOH even kernel code in scripts/kconfig/symbol.c use plain strings
(chars) without defines so feel free to ignore.

I consider renames suggested by Li slightly better (it's really mapping).

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list