[LTP] [PATCH 1/1] nfs_lib.sh: Require mount.nfs, print version

Petr Vorel pvorel@suse.cz
Fri Mar 11 14:22:45 CET 2022


mount.nfs is required for mounting nfs.
NOTE: we check only on lhost. Unlike for exportfs which is actually
required on rhost when testing via ssh, mount.nfs is required on lhost
(unless netns testing, but that is actually always on lhost).

Print its version for better debugging.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/nfs/nfs_stress/nfs_lib.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh
index 1bf31eed25..55ce1e11a4 100644
--- a/testcases/network/nfs/nfs_stress/nfs_lib.sh
+++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
@@ -29,7 +29,7 @@ TST_PARSE_ARGS=nfs_parse_args
 TST_USAGE=nfs_usage
 TST_NEEDS_TMPDIR=1
 TST_NEEDS_ROOT=1
-TST_NEEDS_CMDS="$TST_NEEDS_CMDS mount exportfs"
+TST_NEEDS_CMDS="$TST_NEEDS_CMDS mount exportfs mount.nfs"
 TST_SETUP="${TST_SETUP:-nfs_setup}"
 TST_CLEANUP="${TST_CLEANUP:-nfs_cleanup}"
 TST_NEEDS_DRIVERS="nfsd"
@@ -153,6 +153,8 @@ nfs_setup()
 		done
 	fi
 
+	tst_res TINFO "$(mount.nfs -V)"
+
 	for i in $VERSION; do
 		type=$(get_socket_type $n)
 		tst_res TINFO "setup NFSv$i, socket type $type"
-- 
2.35.1



More information about the ltp mailing list