[LTP] [PATCH 1/1] nfsstat01: Update client RPC calls for kernel 6.9
Petr Vorel
pvorel@suse.cz
Thu Jun 20 13:13:47 CEST 2024
Hi all,
> 6.9 moved client RPC calls to namespace (likely 1548036ef1204 ("nfs:
> make the rpc_stat per net namespace") [1]), thus update test.
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1548036ef1204df65ca5a16e8b199c858cb80075
Actually d47151b79e322 ("nfs: expose /proc/net/sunrpc/nfs in net namespaces")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d47151b79e3220e72ae323b8b8e9d6da20dc884e
but the previous one is obviously related.
Kind regards,
Petr
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/network/nfs/nfsstat01/nfsstat01.sh | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
> diff --git a/testcases/network/nfs/nfsstat01/nfsstat01.sh b/testcases/network/nfs/nfsstat01/nfsstat01.sh
> index c2856eff1..a12b80fad 100755
> --- a/testcases/network/nfs/nfsstat01/nfsstat01.sh
> +++ b/testcases/network/nfs/nfsstat01/nfsstat01.sh
> @@ -15,7 +15,12 @@ get_calls()
> local calls opt
> [ "$name" = "rpc" ] && opt="r" || opt="n"
> - ! tst_net_use_netns && [ "$nfs_f" != "nfs" ] && type="rhost"
> +
> + if tst_net_use_netns; then
> + tst_kvcmp -ge "6.9" && [ "$nfs_f" = "nfs" ] && type="rhost"
> + else
> + [ "$nfs_f" != "nfs" ] && type="rhost"
> + fi
> if [ "$type" = "lhost" ]; then
> calls="$(grep $name /proc/net/rpc/$nfs_f | cut -d' ' -f$field)"
More information about the ltp
mailing list