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

Petr Vorel
2023-12-22T11:42:29Z

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