Hi All,
running the UDP network stress tests on my SH4 target I have had to modify
the following scripts: killall_udp_traffic and udp4-multi-diffip01.
More details within the patches attached.
Regards,
Giuseppe
It deletes the address before setting it to avoid the following error:
RTNETLINK answers: File exists; it implies that the test fails.
Signed-off-by: Giuseppe Cavallaro <[EMAIL PROTECTED]>
--- ltp/testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01.orig 2008-06-23 10:50:09.000000000 +0200
+++ ltp/testcases/network/stress/udp/multi-diffip/udp4-multi-diffip01 2008-06-23 10:50:23.000000000 +0200
@@ -185,6 +185,13 @@ while [ $ipaddr_pair_num -lt $IP_TOTAL_F
# Set IPv4 addresses to the interfaces
ip addr add ${lhost_addr}/${network_mask} broadcast $network_broadcast dev $lhost_ifname
+
+ ### delete before setting
+ if [ $? -eq 2 ]; then
+ ip addr del ${lhost_addr}/${network_mask} broadcast $network_broadcast dev $lhost_ifname 2>&1
+ ip addr add ${lhost_addr}/${network_mask} broadcast $network_broadcast dev $lhost_ifname
+ fi
+
if [ $? -ne 0 ]; then
if [ $ipaddr_pair_num -eq 0 ]; then
tst_resm TBROK "Failed to add any IP address at the local"
@@ -196,6 +203,10 @@ while [ $ipaddr_pair_num -lt $IP_TOTAL_F
fi
ret=`$LTP_RSH $RHOST 'PATH=/sbin:/usr/sbin:$PATH ip' addr add ${rhost_addr}/${network_mask} broadcast $network_broadcast dev $rhost_ifname' ; echo $?'`
+ if [ $ret -eq 2 ]; then
+ $LTP_RSH $RHOST 'PATH=/sbin:/usr/sbin:$PATH ip' addr del ${rhost_addr}/${network_mask} broadcast $network_broadcast dev $rhost_ifname
+ ret=`$LTP_RSH $RHOST 'PATH=/sbin:/usr/sbin:$PATH ip' addr add ${rhost_addr}/${network_mask} broadcast $network_broadcast dev $rhost_ifname' ; echo $?'`
+ fi
if [ $ret -ne 0 ]; then
if [ $ipaddr_pair_num -eq 0 ]; then
tst_resm TBROK "Failed to add any IP address at the remote"
@@ -218,6 +229,12 @@ while [ $ipaddr_pair_num -lt $IP_TOTAL_F
# Set IPv6 addresses to the interfaces
ip addr add ${lhost_addr}/${network_mask} dev $lhost_ifname
+
+ if [ $ret -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
+
if [ $? -ne 0 ]; then
if [ $ipaddr_pair_num -eq 0 ]; then
tst_resm TBROK "Failed to add any IP address at the local"
@@ -229,6 +246,12 @@ while [ $ipaddr_pair_num -lt $IP_TOTAL_F
fi
ret=`$LTP_RSH $RHOST 'PATH=/sbin:/usr/sbin:$PATH ip' addr add ${rhost_addr}/${network_mask} dev $rhost_ifname' ; echo $?'`
+
+ if [ $ret -eq 2 ]; then
+ LTP_RSH $RHOST 'PATH=/sbin:/usr/sbin:$PATH ip' addr del ${rhost_addr}/${network_mask} dev $rhost_ifname
+ ret=`$LTP_RSH $RHOST 'PATH=/sbin:/usr/sbin:$PATH ip' addr add ${rhost_addr}/${network_mask} dev $rhost_ifname' ; echo $?'`
+ fi
+
if [ $ret -ne 0 ]; then
if [ $ipaddr_pair_num -eq 0 ]; then
tst_resm TBROK "Failed to add any IP address at the remote"
This modifies the command sent to the remote host just to kill the
ns-udpclient script.
Indeed, it seems that the previous string always returns 1.
Moreover, it adds a new check to verify if the return value is not empty.
It could happen, for example, if the RSH returns sometime the following error:
poll: protocol failure in circuit setup
Signed-off-by: Giuseppe Cavallaro <[EMAIL PROTECTED]>
--- ltp/testcases/network/stress/ns-tools/killall_udp_traffic.orig 2008-06-23 10:57:15.000000000 +0200
+++ ltp/testcases/network/stress/ns-tools/killall_udp_traffic 2008-06-23 10:57:24.000000000 +0200
@@ -80,7 +80,13 @@ done
# Verify the client is dead.
start_epoc=`date +%s`
while true ; do
- ret=`$LTP_RSH $RHOST 'ps auxw | fgrep -v grep | grep -l '[[:blank:]]ns-udpclient[[:blank:]]' >/dev/null 2>&1; echo $?'`
+ #ret=`$LTP_RSH $RHOST 'ps auxw | fgrep -v grep | grep -l '[[:blank:]]ns-udpclient[[:blank:]]' >/dev/null 2>&1; echo $?'`
+ ret=`$LTP_RSH $RHOST 'ps auxw | fgrep -v grep | grep -l '/ns-udpclient[[:blank:]]' >/dev/null 2>&1; echo $?'`
+
+ if [ -z $ret ]; then
+ continue
+ fi
+
if [ $ret -ne 0 ]; then
break
fi
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list