public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] Add test for per-NS NFS client statistics
@ 2024-08-30 14:13 Martin Doucha
  2024-08-30 14:13 ` [LTP] [PATCH 2/2] nfsstat01: Check that RPC stats don't leak between net namespaces Martin Doucha
  2024-08-30 20:09 ` [LTP] [PATCH 1/2] Add test for per-NS NFS client statistics Petr Vorel
  0 siblings, 2 replies; 13+ messages in thread
From: Martin Doucha @ 2024-08-30 14:13 UTC (permalink / raw)
  To: NeilBrown, Chuck Lever III, Petr Vorel, ltp

Check that /proc/net/rpc/nfs file exists in nested network namespaces.

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---

Only do the minimal check here. If the file exists in namespaces,
nfsstat01.sh will take care of functional testing.

 runtest/net.nfs                              |  2 ++
 testcases/network/nfs/nfsstat01/nfsstat02.sh | 23 ++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100755 testcases/network/nfs/nfsstat01/nfsstat02.sh

diff --git a/runtest/net.nfs b/runtest/net.nfs
index 929868a7b..7f84457bc 100644
--- a/runtest/net.nfs
+++ b/runtest/net.nfs
@@ -116,6 +116,8 @@ nfsstat01_v40_ip6t nfsstat01.sh -6 -v 4 -t tcp
 nfsstat01_v41_ip6t nfsstat01.sh -6 -v 4.1 -t tcp
 nfsstat01_v42_ip6t nfsstat01.sh -6 -v 4.2 -t tcp
 
+nfsstat02 nfsstat02.sh
+
 fsx_v30_ip4u fsx.sh -v 3 -t udp
 fsx_v30_ip4t fsx.sh -v 3 -t tcp
 fsx_v40_ip4t fsx.sh -v 4 -t tcp
diff --git a/testcases/network/nfs/nfsstat01/nfsstat02.sh b/testcases/network/nfs/nfsstat01/nfsstat02.sh
new file mode 100755
index 000000000..1e1bebe97
--- /dev/null
+++ b/testcases/network/nfs/nfsstat01/nfsstat02.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2024 SUSE LLC <mdoucha@suse.cz>
+
+TST_TESTFUNC="do_test"
+
+# PURPOSE:  Check that /proc/net/rpc/nfs exists in nested network namespaces
+do_test()
+{
+	local procfile="/proc/net/rpc/nfs"
+
+	if tst_rhost_run -c "test -e '$procfile'"; then
+		tst_res TPASS "$procfile exists in net namespaces"
+	else
+		tst_res TFAIL "$procfile missing in net namespaces"
+	fi
+}
+
+# Force use of nested net namespace
+unset RHOST
+
+. nfs_lib.sh
+tst_run
-- 
2.46.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-09-03  8:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 14:13 [LTP] [PATCH 1/2] Add test for per-NS NFS client statistics Martin Doucha
2024-08-30 14:13 ` [LTP] [PATCH 2/2] nfsstat01: Check that RPC stats don't leak between net namespaces Martin Doucha
2024-08-30 18:10   ` Chuck Lever via ltp
2024-08-30 20:04     ` Petr Vorel
2024-08-30 20:26       ` Petr Vorel
2024-09-02 11:49     ` Martin Doucha
2024-09-02 18:13       ` Chuck Lever III via ltp
2024-09-03  8:26         ` Martin Doucha
2024-08-30 20:15   ` Petr Vorel
2024-09-02 11:58     ` Martin Doucha
2024-09-02 18:15       ` Petr Vorel
2024-08-30 20:09 ` [LTP] [PATCH 1/2] Add test for per-NS NFS client statistics Petr Vorel
2024-09-02 11:51   ` Martin Doucha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox