[LTP] [PATCH] stress/udp/multi-diffip: bugfix for multi-diffip/udp4-multi-diffip01

Li Min limin154@huawei.com
Thu Sep 14 20:22:59 CEST 2023


udp4-multi-diffip01: line 233: ret: unbound variable

Signed-off-by: Min Li <limin154@huawei.com>
---
 testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01 b/testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01
index 92af9e438..c0d50efaf 100644
--- a/testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01
+++ b/testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01
@@ -230,7 +230,7 @@ while [ $ipaddr_pair_num -lt $IP_TOTAL_FOR_TCPIP ]; do
 	# Set IPv6 addresses to the interfaces
 	ip addr add ${lhost_addr}/${network_mask} dev $lhost_ifname

-	if [ $ret -eq 2 ]; then
+	if [ $? -eq 2 ]; then
 	ip addr del ${lhost_addr}/${network_mask} dev $lhost_ifname  2>&1
 	ip addr add ${lhost_addr}/${network_mask} dev $lhost_ifname
 	fi
--
2.33.0



More information about the ltp mailing list