lib/tst_kconfig: rename runtime_check to config_runtime_map
PATCH 1/1 lib/tst_kconfig: rename runtime_check to config_runtime_map
Rename struct 'runtime_check' to 'config_runtime_map' and array 'runtime_checks' to 'config_runtime_maps' to better reflect their purpose of mapping kconfig options to runtime checks.
Rename function runtime_check to kconfig_runtime_check for consistency with kconfig_module_check().
Follow-up: d7d6512e89 ("lib: tst_kconfig: Add module presence checks")
---
Notes:
Hi Cyril,
It seems you forgot to add this modification at the top of the patchset. So I made it for the name consistency.
lib/tst_kconfig.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
lib/tst_kconfig.c +8 -8
@@ -112,10 +112,10 @@ static void close_kconfig(FILE *fp)fclose (fp); } -static struct runtime_check { +static struct config_runtime_map {const char *config;bool (*runtime_check)(void ); -} runtime_checks[] = { +} config_runtime_maps[] = { {"CONFIG_USER_NS" , tst_user_ns_enabled}, {"CONFIG_NET_NS" , tst_net_ns_enabled}, {"CONFIG_PID_NS" , tst_pid_ns_enabled},
@@ -124,17 +124,17 @@ static struct runtime_check { {} }; -static void runtime_check (struct tst_kconfig_var *var) +static void kconfig_runtime_check (struct tst_kconfig_var *var) {size_t i; -for (i =0 ; runtime_checks[i].config; i++) { -if (strcmp (runtime_checks[i].config, var->id)) +for (i =0 ; config_runtime_maps[i].config; i++) { +if (strcmp (config_runtime_maps[i].config, var->id))continue ;tst_res (TDEBUG ,"Running runtime check for '%s'" , var->id); -if (!runtime_checks[i].runtime_check ()) { +if (!config_runtime_maps[i].runtime_check ()) {tst_res (TINFO ,"%s=%c present but disabled at runtime" , var->id, var->choice);
@@ -257,11 +257,11 @@ out:switch (val[0 ]) {case 'y' : vars[i].choice ='y' ; -runtime_check (&vars[i]); +kconfig_runtime_check (&vars[i]);return 1 ;case 'm' : vars[i].choice ='m' ; -runtime_check (&vars[i]); +kconfig_runtime_check (&vars[i]);kconfig_module_check (&vars[i]);return 1 ; }
Signature · 5 lines
2.53.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Li,
Quoted 1 line · Li Wang
lib/tst_kconfig: renameruntime_checktoconfig_runtime_map
---
Note:
Our agent completed the review of the patch. The full review can be found at: https://github.com/linux-test-project/ltp-agent/actions/runs/24724928089
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 9 lines
Rename struct '
runtime_check' to 'config_runtime_map' and array 'runtime_checks' to 'config_runtime_maps' to better reflect their purpose of mapping kconfig options to runtime checks.Rename function
runtime_checktokconfig_runtime_checkfor consistency withkconfig_module_check().Follow-up:
d7d6512e89("lib:tst_kconfig: Add module presence checks")
Quoted 8 lines
Signed-off-by Li Wang <[email protected]>---
Notes:
Hi Cyril,It seems you forgot to add this modification at the top of the patchset. So I made it for the name consistency.
I was going to send the patch to the ML but you were faster...
Anyways:
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 11 lines · Cyril Hrubis
Quoted 5 lines
Notes:
Hi Cyril,It seems you forgot to add this modification at the top of the patchset. So I made it for the name consistency.
I was going to send the patch to the ML but you were faster...
Anyways:
Reviewed-by Cyril Hrubis <[email protected]>
Thank you, pushed.
--
Regards,
Li Wang
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp