Skip to contentSkip to conversation

stress/udp/multi-diffip: bugfix for multi-diffip/udp4-multi-diffip01

PATCH In review Li Min via ltp 2 participants 3 messages Sep 12, 2023 – Sep 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stress/udp/multi-diffip: bugfix for multi-diffip/udp4-multi-diffip01

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

---
 testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01 +1 -1
index 92af9e438..c0d50efaf 100644
@@ -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

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
author Reviewed-by Andrea Cervesato on v1 1/1
#1 lore raw

Hi!

Thanks for catching this bug. It will be pushed by maintainers according with LTP release code freeze time.

Best regards,
Andrea Cervesato

Quoted 24 lines · Li Min via ltp

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

---
  testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01 +1 -2
index 92af9e438..c0d50efaf 100644
@@ -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

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp