[LTP] [PATCH v2 1/3] nfs_lib.sh: Add nfs_get_remote_path()

Petr Vorel pvorel@suse.cz
Tue Nov 23 20:26:49 CET 2021


Hi Martin,

> 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().
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

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

> Changes since v1: None

>  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


More information about the ltp mailing list