public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/3] nfs_lib.sh: Add nfs_get_remote_path()
@ 2021-11-18 17:23 Martin Doucha
  2021-11-18 17:23 ` [LTP] [PATCH 2/3] nfs_lib.sh: Add support for test-specific parameters Martin Doucha
  2021-11-18 17:23 ` [LTP] [PATCH 3/3] Add test for NFS directory listing regression Martin Doucha
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Doucha @ 2021-11-18 17:23 UTC (permalink / raw)
  To: ltp

Sometimes it's necessary to manipulate remote NFS directory directly e.g.
to simulate external server activity. nfs_get_remote_path() will print
the remote path so that it can then be used by tst_rhost_run().

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 testcases/network/nfs/nfs_stress/nfs_lib.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh
index 206f11fdd..790655643 100644
--- a/testcases/network/nfs/nfs_stress/nfs_lib.sh
+++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
@@ -52,6 +52,19 @@ get_socket_type()
 	done
 }
 
+nfs_get_remote_path()
+{
+	local v
+	local type=$(get_socket_type ${2:-0})
+
+	for v in $VERSION; do
+		break;
+	done
+
+	v=${1:-$v}
+	echo "$TST_TMPDIR/$v/$type"
+}
+
 nfs_server_udp_enabled()
 {
 	local config f
-- 
2.33.0


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

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

end of thread, other threads:[~2021-11-23  9:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-18 17:23 [LTP] [PATCH 1/3] nfs_lib.sh: Add nfs_get_remote_path() Martin Doucha
2021-11-18 17:23 ` [LTP] [PATCH 2/3] nfs_lib.sh: Add support for test-specific parameters Martin Doucha
2021-11-18 17:23 ` [LTP] [PATCH 3/3] Add test for NFS directory listing regression Martin Doucha
2021-11-23  9:49   ` Petr Vorel

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