[LTP] [PATCH] lib: add TST_NO_SLOW_KCONFIG_CHECK macro for testcase tools

Petr Vorel pvorel@suse.cz
Fri Jan 17 09:43:52 CET 2025


Hi all,

> On Fri, Jan 17, 2025 at 3:49 PM Andrea Cervesato <andrea.cervesato@suse.com>
> wrote:

> > Hi Li,

> > the feature is interesting, but I have the feeling this should be added
> > to tst_test struct rather than using a flag at compile time.
> > For example, by adding to tst_test a slow_kconfig attribute.


> Thanks. But sounds a little bit unnecessary to add new field in tst_test
> struct.

> What about using an global variable like tst_no_slow_kcofig_check ?

This could work.

I sent a patch which takes yet another option: static inline function which
differs based on existing TST_NO_DEFAULT_MAIN. That keeps the functionality for
tests only, avoid it for libraries.

Actually similar approach Li did, but moved to header (it cannot be in C file).

Kind regards,
Petr

> > Andrea



More information about the ltp mailing list