This patch removes testns after test failure so that next test can
continue with clean ns
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Acked-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        ip link help gretap 2>&1 | grep -q "^Usage:"
        if [ $? -ne 0 ];then
                echo "SKIP: gretap: iproute2 too old"
+               ip netns del "$testns"
                return 1
        fi
 
 
        if [ $ret -ne 0 ]; then
                echo "FAIL: gretap"
+               ip netns del "$testns"
                return 1
        fi
        echo "PASS: gretap"
        ip link help ip6gretap 2>&1 | grep -q "^Usage:"
        if [ $? -ne 0 ];then
                echo "SKIP: ip6gretap: iproute2 too old"
+               ip netns del "$testns"
                return 1
        fi
 
 
        if [ $ret -ne 0 ]; then
                echo "FAIL: ip6gretap"
+               ip netns del "$testns"
                return 1
        fi
        echo "PASS: ip6gretap"
 
        if [ $ret -ne 0 ]; then
                echo "FAIL: erspan"
+               ip netns del "$testns"
                return 1
        fi
        echo "PASS: erspan"
 
        if [ $ret -ne 0 ]; then
                echo "FAIL: ip6erspan"
+               ip netns del "$testns"
                return 1
        fi
        echo "PASS: ip6erspan"