Do not let the errors happen silently. The patch adds some messages.
Signed-off-by: Sudhir Kumar <[email protected]>
Index: ltp-full-20081130/testcases/kernel/containers/netns/childns.sh
===================================================================
--- ltp-full-20081130.orig/testcases/kernel/containers/netns/childns.sh
+++ ltp-full-20081130/testcases/kernel/containers/netns/childns.sh
@@ -54,6 +54,10 @@ status=0
debug "INFO: network dev name received $vnet1";
# Assigning the dev addresses
ifconfig $vnet1 $IP2/24 up > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ debug "Failed to make interface $vnet1 up in child....."
+ fi
+
ifconfig lo up ;
sleep 2
Index: ltp-full-20081130/testcases/kernel/containers/netns/parentns.sh
===================================================================
--- ltp-full-20081130.orig/testcases/kernel/containers/netns/parentns.sh
+++ ltp-full-20081130/testcases/kernel/containers/netns/parentns.sh
@@ -65,7 +65,13 @@ status=0
sleep 2
ifconfig $vnet0 $IP1/24 up > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ debug "Failed to make interface $vnet0 up in parent....."
+ fi
route add -host $IP2 dev $vnet0
+ if [ $? -ne 0 ]; then
+ debug "Failed to add route to child in parent for $vnet0....."
+ fi
echo 1 > /proc/sys/net/ipv4/conf/$vnet0/proxy_arp
# Waits for the Child-NS to get created and reads the PID
@@ -73,6 +79,9 @@ status=0
pid=$2;
debug "INFO: the pid of child is $pid"
ip link set $vnet1 netns $pid
+ if [ $? -ne 0 ]; then
+ echo "Failed to assign network device to child .........."
+ fi
# Passes the device name to Child NS
echo $vnet1 > /tmp/FIFO2
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list