[LTP] [PATCH 2/2] nfsstat01: Check that RPC stats don't leak between net namespaces
Petr Vorel
pvorel@suse.cz
Mon Sep 2 20:15:39 CEST 2024
Hi Martin,
> Hi,
> On 30. 08. 24 22:15, Petr Vorel wrote:
> > > @@ -93,6 +97,16 @@ do_test()
> > > tst_res TPASS "client RPC calls increased"
> > > fi
> > > + if [ $NS_STAT_RHOST -ne 0 ]; then
> > > + tst_res TINFO "Root NS client RPC calls: $root_calls => $new_root_calls"
> > > +
> > > + if [ $root_calls -ne $new_root_calls ]; then
> > > + tst_res TFAIL "RPC stats leaked between net namespaces"
> > > + else
> > > + tst_res TPASS "RPC stats stay within net namespaces"
> > > + fi
> > Maybe also add TCONF message? (can be added before merge)
> > else
> > tst_res TCONF "Not testing leak between root NS and net NS due old kernel"
> I think the TCONF message doesn't make sense here. There are several cases
> where the new check will be skipped:
> 1) the NFS server runs on another machine ($RHOST is not empty)
> 2) the test is configure to ignore namespaces ($LTP_NFS_NETNS_USE_LO is not
> empty)
> 3) /proc/net/rpc/nfs doesn't exist in nested net namespaces
> You want to print the TCONF message only in case #3. Let's keep the
> condition above simple.
Fair enough. I merged just with adding kernel commit and patchset link in the
first commit. Thanks!
NOTE: I noticed your point about mount namespaces (interesting I wonder if there
will be some change), but merged as it reflects the current kernel code.
Kind regards,
Petr
More information about the ltp
mailing list