CAI Qian wrote:
Hi,
--- Veerendra <[EMAIL PROTECTED]> wrote:
This patch has 4 files..
check_netns_enabled.c - checks for the network ns is enabled
initialize.sh - Initializes the common functions and variables
Makefile - Makefile
runnetnstest.sh - Creates a batch file to run the tests.
[...]
+ #Restoring the orignial values .
+ echo $ipfwd > /proc/sys/net/ipv4/ip_forward > /dev/null
This will not restore anything for you.
You're right.
This small patch (attached) should fix the issues you raised.
Benjamin
+ if [ -f /proc/sys/net/ipv4/conf/$netdev/proxy_arp ] ; then
+ echo $arpproxy > /proc/sys/net/ipv4/conf/$netdev/proxy_arp >
/dev/null
Same here.
+ fi
( kill -9 $pid ) 2> /dev/null
- rm -f /tmp/FIFO1 /tmp/FIFO2 /tmp/FIFO3 /tmp/FIFO4 /tmp/FIFO5
/tmp/FIFO6 > /dev/null
There should not be anything from STDOUT.
- rm -f /tmp/net1 /tmp/net2 > /dev/null
Same here.
+ rm -f /tmp/FIFO1 /tmp/FIFO2 /tmp/FIFO3 /tmp/FIFO4 \
+ /tmp/FIFO5 /tmp/FIFO6 > /dev/null
Same here.
+ rm -f /tmp/net1 /tmp/net2 > /dev/null || true
Same here.
Cai Qian
[...]
--
B e n j a m i n T h e r y - BULL/DT/Open Software R&D
http://www.bull.com
From: Benjamin Thery <[EMAIL PROTECTED]>
Subject: netns: fix restoration of original /proc values (ip_forward...)
This small patches make the restoration of
/proc/sys/net/ipv4/ip_forward
/proc/sys/net/ipv4/conf/$netdev/proxy_arp
works as expected in netns/initialize.sh.
Also removed some unneeded /dev/null redirections.
Signed-off-by: Benjamin Thery <[EMAIL PROTECTED]>
---
testcases/kernel/containers/netns/initialize.sh | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Index: ltp/testcases/kernel/containers/netns/initialize.sh
===================================================================
--- ltp.orig/testcases/kernel/containers/netns/initialize.sh
+++ ltp/testcases/kernel/containers/netns/initialize.sh
@@ -89,14 +89,13 @@ cleanup()
sleep 1
#Restoring the orignial values .
- echo $ipfwd > /proc/sys/net/ipv4/ip_forward > /dev/null
+ echo $ipfwd > /proc/sys/net/ipv4/ip_forward
if [ -f /proc/sys/net/ipv4/conf/$netdev/proxy_arp ] ; then
- echo $arpproxy > /proc/sys/net/ipv4/conf/$netdev/proxy_arp > /dev/null
+ echo $arpproxy > /proc/sys/net/ipv4/conf/$netdev/proxy_arp
fi
( kill -9 $pid ) 2> /dev/null
- rm -f /tmp/FIFO1 /tmp/FIFO2 /tmp/FIFO3 /tmp/FIFO4 \
- /tmp/FIFO5 /tmp/FIFO6 > /dev/null
- rm -f /tmp/net1 /tmp/net2 > /dev/null || true
+ rm -f /tmp/FIFO1 /tmp/FIFO2 /tmp/FIFO3 /tmp/FIFO4 /tmp/FIFO5 /tmp/FIFO6
+ rm -f /tmp/net1 /tmp/net2 || true
}
debug()
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list