Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com>
---
 testcases/network/vxlan/vxlan01.sh   |    8 ++++----
 testcases/network/vxlan/vxlan02.sh   |    6 +++---
 testcases/network/vxlan/vxlan_lib.sh |   28 ++++++++++------------------
 3 files changed, 17 insertions(+), 25 deletions(-)

diff --git a/testcases/network/vxlan/vxlan01.sh 
b/testcases/network/vxlan/vxlan01.sh
index 0942573..574e9c0 100755
--- a/testcases/network/vxlan/vxlan01.sh
+++ b/testcases/network/vxlan/vxlan01.sh
@@ -33,13 +33,13 @@ opt="group 239.1.1.1"
 vnis=$(seq $start_vni $max)
 
 for i in $vnis; do
-       safe_run "ip link add ltp_vxl${i} type vxlan id $i $opt"
-       safe_run "ip link set ltp_vxl${i} up"
+       ROD_SILENT "ip link add ltp_vxl${i} type vxlan id $i $opt"
+       ROD_SILENT "ip link set ltp_vxl${i} up"
 done
 
 for i in $vnis; do
-       safe_run "ip link set ltp_vxl${i} down"
-       safe_run "ip link delete ltp_vxl${i}"
+       ROD_SILENT "ip link set ltp_vxl${i} down"
+       ROD_SILENT "ip link delete ltp_vxl${i}"
 done
 
 tst_resm TPASS "done"
diff --git a/testcases/network/vxlan/vxlan02.sh 
b/testcases/network/vxlan/vxlan02.sh
index 3f7e149..6220a0d 100755
--- a/testcases/network/vxlan/vxlan02.sh
+++ b/testcases/network/vxlan/vxlan02.sh
@@ -31,9 +31,9 @@ opt="group 239.1.1.1"
 tst_resm TINFO "create, delete ltp_vxl1 $vxlan_max times"
 
 for i in $(seq 0 $vxlan_max); do
-       safe_run "ip link add ltp_vxl1 type vxlan id $start_vni $opt"
-       safe_run "ip link set ltp_vxl1 up"
-       safe_run "ip link delete ltp_vxl1"
+       ROD_SILENT "ip link add ltp_vxl1 type vxlan id $start_vni $opt"
+       ROD_SILENT "ip link set ltp_vxl1 up"
+       ROD_SILENT "ip link delete ltp_vxl1"
 done
 tst_resm TPASS "done"
 
diff --git a/testcases/network/vxlan/vxlan_lib.sh 
b/testcases/network/vxlan/vxlan_lib.sh
index c374b43..d3091ac 100644
--- a/testcases/network/vxlan/vxlan_lib.sh
+++ b/testcases/network/vxlan/vxlan_lib.sh
@@ -107,14 +107,6 @@ cleanup_vxlans()
 TST_CLEANUP="cleanup_vxlans"
 trap "tst_brkm TBROK 'test interrupted'" INT
 
-safe_run()
-{
-       $@ > /dev/null 2>&1
-       if [ $? -ne 0 ]; then
-               tst_brkm TBROK "cmd failed: $@"
-       fi
-}
-
 vxlan_setup_subnet_uni()
 {
        tst_kvercmp 3 10 0 && \
@@ -127,10 +119,10 @@ vxlan_setup_subnet_uni()
 
        tst_resm TINFO "setup VxLANv$ipver with unicast address: '$opt'"
 
-       safe_run "ip li add ltp_vxl0 type vxlan id $1 $opt"
-       safe_run "ip li set ltp_vxl0 address $mac_vxlan_local"
-       safe_run "ip addr add ${ip_vxlan_local}/24 dev ltp_vxl0"
-       safe_run "ip li set up ltp_vxl0"
+       ROD_SILENT "ip li add ltp_vxl0 type vxlan id $1 $opt"
+       ROD_SILENT "ip li set ltp_vxl0 address $mac_vxlan_local"
+       ROD_SILENT "ip addr add ${ip_vxlan_local}/24 dev ltp_vxl0"
+       ROD_SILENT "ip li set up ltp_vxl0"
 
        opt="remote $(tst_ipaddr)"
 
@@ -156,10 +148,10 @@ vxlan_setup_subnet_multi()
 
        tst_resm TINFO "setup VxLANv$ipver with multicast address: '$opt'"
 
-       safe_run "ip li add ltp_vxl0 type vxlan id $1 $opt dev $(tst_iface)"
-       safe_run "ip li set ltp_vxl0 address $mac_vxlan_local"
-       safe_run "ip addr add ${ip_vxlan_local}/24 dev ltp_vxl0"
-       safe_run "ip li set up ltp_vxl0"
+       ROD_SILENT "ip li add ltp_vxl0 type vxlan id $1 $opt dev $(tst_iface)"
+       ROD_SILENT "ip li set ltp_vxl0 address $mac_vxlan_local"
+       ROD_SILENT "ip addr add ${ip_vxlan_local}/24 dev ltp_vxl0"
+       ROD_SILENT "ip li set up ltp_vxl0"
 
        tst_rhost_run -s -c "ip li add ltp_vxl0 type vxlan id $2 $opt \
                             dev $(tst_iface rhost)"
@@ -217,7 +209,7 @@ vxlan_compare_netperf()
        netload_test $ip_vxlan_remote res_ipv4 || ret=1
        netload_test ${ip6_vxlan_remote}%ltp_vxl0 res_ipv6 || ret=1
 
-       safe_run "ip link delete ltp_vxl0"
+       ROD_SILENT "ip link delete ltp_vxl0"
        tst_rhost_run -s -c "ip link delete ltp_vxl0"
        [ "$ret" -eq 1 ] && return 1
        local vt="$(cat res_ipv4)"
@@ -258,4 +250,4 @@ ip link add ltp_vxl type vxlan id $start_vni > /dev/null 
2>&1
 if [ $? -ne 0 ]; then
        tst_brkm TCONF "iproute2 or kernel doesn't support vxlan"
 fi
-safe_run "ip link delete ltp_vxl"
+ROD_SILENT "ip link delete ltp_vxl"
-- 
1.7.1


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to