[LTP] [PATCH 2/3] syscalls/swapon03: Use get_maxswapfiles() api instead of hard code

Petr Vorel pvorel@suse.cz
Fri Dec 22 12:42:04 CET 2023


Hi Xu,

> Hi Li, Petr

> I am writting v2 patch that introduce another libltpswap api named
> as get_used_swapfiles like we did in ipc library.

> But I found libltpswap and swapon/swapoff cases all use swapon/swapff 
> syscall directly instead of glibc wrapper. IMO, on old glibc/other libc 
> doesn't support this wrapper so it use syscall directly. Can I replace 
> them by glibc wrapper directly?

how about use both libc wrapper and raw syscall via .test_variants?

Kind regards,
Petr

> Best Regards
> Yang Xu


More information about the ltp mailing list