@@ -91,7 +91,7 @@ nfs_mount()
local host_type=rhost
local mount_dir
- [ -n "$LTP_NETNS" ] && host_type=
+ tst_net_use_netns && host_type=
if [ $TST_IPV6 ]; then
mount_dir="[$(tst_ipaddr $host_type)]:$remote_dir"
@@ -102,7 +102,7 @@ nfs_mount()
local mnt_cmd="mount -v -t nfs $opts $mount_dir $local_dir"
tst_res TINFO "Mounting NFS: $mnt_cmd"
- if [ -n "$LTP_NETNS" ] && [ -z "$LTP_NFS_NETNS_USE_LO" ]; then
+ if tst_net_use_netns && [ -z "$LTP_NFS_NETNS_USE_LO" ]; then
tst_rhost_run -c "$mnt_cmd" > mount.log
else
$mnt_cmd > mount.log
@@ -17,7 +17,7 @@ get_calls()
local opt=
[ "$name" = "rpc" ] && opt="r" || opt="n"
- if [ -n "$LTP_NETNS" -o "$nfs_f" = "nfs" ]; then
+ if tst_net_use_netns || [ "$nfs_f" = "nfs" ]; then
calls="$(grep $name /proc/net/rpc/$nfs_f | cut -d' ' -f$field)"
ROD nfsstat -c$opt | grep -q "$calls"
echo "$calls"
@@ -12,7 +12,7 @@ TST_CNT=3
setup()
{
- if [ -n "$LTP_NETNS" -a "$VIRT_PERF_THRESHOLD" -lt 700 ]; then
+ if tst_net_use_netns && [ "$VIRT_PERF_THRESHOLD" -lt 700 ]; then
tst_res TINFO "Adjust threshold for veth (no encap/encrypt)"
VIRT_PERF_THRESHOLD=700
fi
instead of LTP_NETNS variable Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/network/nfs/nfs_stress/nfs_lib.sh | 4 ++-- testcases/network/nfs/nfsstat01/nfsstat01 | 2 +- testcases/network/virt/wireguard01.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)