syscalls/swapping01: Use .needs_kconfigs instead of .setup
PATCH 1/1 syscalls/swapping01: Use .needs_kconfigs instead of .setup
needs_kconfigs is more beneficial for docparser
Signed-off-by Bogdan Lezhepekov <[email protected]>
--- testcases/kernel/mem/swapping/swapping01.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
testcases/kernel/mem/swapping/swapping01.c +4 -7
@@ -155,18 +155,15 @@ static void check_swapping(void)SAFE_WAITPID (pid, &status,0 ); } -static void setup (void ) -{ -if (access ("/proc/swaps" ,F_OK )) -tst_brk (TCONF ,"swap not supported by kernel" ); -} -static struct tst_test test = { .needs_root =1 , .forks_child =1 , .min_mem_avail =10 , .test_all = test_swapping, - .setup = setup, + .needs_kconfigs = (const char *[]) { +"CONFIG_SWAP=y" , +NULL + }, .tags = (const struct tst_tag []) { {"linux-git" ,"50a15981a1fa" }, {}
Signature · 5 lines
2.35.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp