[LTP] [PATCH v4 4/5] sysctl/sysctl02.sh: Use kconfig shell api

Petr Vorel pvorel@suse.cz
Thu Jan 13 11:53:10 CET 2022


Hi Xu, all,

subject: "sysctl/sysctl02.sh: Use kconfig shell api"
nit: s/api/API/

Maybe to explain why it's better thatn simple [ -f /proc/kallsyms ] ?
Isn't it more reliable to use /proc/kallsyms file instead of requiring kconfig?

kconfig is sort of documentation, but only if used as TST_NEEDS_KCONFIGS
(I'm going to work on enabling docparse for shell), which is not this case.

If we agree TST_NEEDS_KCONFIGS is better in this case how about to put
sysctl_test_zero into separate file? It could then define things required setup
in TST_NEEDS_KCONFIGS.

> +++ b/testcases/commands/sysctl/sysctl02.sh
> @@ -20,15 +20,14 @@ TST_CLEANUP=cleanup
>  TST_CNT=4
>  TST_NEEDS_ROOT=1
>  TST_NEEDS_CMDS="sysctl"
> +TST_NEEDS_KCONFIGS="CONFIG_SYSCTL=y, CONFIG_PROC_FS=y"
As Cyril mentioned previously CONFIG_PROC_FS can be dropped
(IMHO mandatory for today's linux).

OK, looking into sources it's disabled in:

arch/h8300/configs/edosk2674_defconfig, the other two are GDB simulators.
=> only this one relevant (Renesas EDOSK2674R)
arch/h8300/configs/h8300h-sim_defconfig
arch/h8300/configs/h8s-sim_defconfig

arch/sh/configs/edosk7705_defconfig
arch/sh/configs/sh7724_generic_defconfig
arch/sh/configs/sh7770_generic_defconfig

=> sh and h8300 are certainly not mainstream :).
I can ask the maintainers whether they really use kernel without CONFIG_PROC_FS.

But I'd still consider to safe to expect CONFIG_PROC_FS=y.

Kind regards,
Petr


More information about the ltp mailing list