[LTP] [PATCH v3 1/2] nfs_lib.sh: Add support for extra NFS mount options

Petr Vorel pvorel@suse.cz
Thu Dec 5 11:34:39 CET 2024


Hi Martin,

...
> +		nfs_opts="-o proto=$type,vers=$i"
> +
> +		if [ ! -z "$NFS_MOUNT_OPTS" ]; then

We have -n for non-null string. Even just [ "$NFS_MOUNT_OPTS" ] would work,
but -n is more obvious. I can change it before merge:

		if [ -n "$NFS_MOUNT_OPTS" ]; then

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

> +			nfs_opts="$nfs_opts,$NFS_MOUNT_OPTS"
> +		fi
> +
>  		tst_res TINFO "Mounting $local_dir"
> -		nfs_mount "$local_dir" "$remote_dir" "-o proto=$type,vers=$i"
> +		nfs_mount "$local_dir" "$remote_dir" "$nfs_opts"


More information about the ltp mailing list