All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] selftests: rtnetlink: remove testns on test fail
@ 2018-03-02  2:22 Prashant Bhole
  2018-03-02 13:38 ` William Tu
  2018-03-04 23:36 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Prashant Bhole @ 2018-03-02  2:22 UTC (permalink / raw)
  To: David S . Miller; +Cc: Prashant Bhole, Shuah Khan, Florian Westphal, netdev

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>
---
 tools/testing/selftests/net/rtnetlink.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
index a622eeecc3a6..e6f485235435 100755
--- a/tools/testing/selftests/net/rtnetlink.sh
+++ b/tools/testing/selftests/net/rtnetlink.sh
@@ -517,6 +517,7 @@ kci_test_gretap()
 	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
 
@@ -543,6 +544,7 @@ kci_test_gretap()
 
 	if [ $ret -ne 0 ]; then
 		echo "FAIL: gretap"
+		ip netns del "$testns"
 		return 1
 	fi
 	echo "PASS: gretap"
@@ -565,6 +567,7 @@ kci_test_ip6gretap()
 	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
 
@@ -591,6 +594,7 @@ kci_test_ip6gretap()
 
 	if [ $ret -ne 0 ]; then
 		echo "FAIL: ip6gretap"
+		ip netns del "$testns"
 		return 1
 	fi
 	echo "PASS: ip6gretap"
@@ -655,6 +659,7 @@ kci_test_erspan()
 
 	if [ $ret -ne 0 ]; then
 		echo "FAIL: erspan"
+		ip netns del "$testns"
 		return 1
 	fi
 	echo "PASS: erspan"
@@ -720,6 +725,7 @@ kci_test_ip6erspan()
 
 	if [ $ret -ne 0 ]; then
 		echo "FAIL: ip6erspan"
+		ip netns del "$testns"
 		return 1
 	fi
 	echo "PASS: ip6erspan"
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: rtnetlink: remove testns on test fail
  2018-03-02  2:22 [PATCH net-next] selftests: rtnetlink: remove testns on test fail Prashant Bhole
@ 2018-03-02 13:38 ` William Tu
  2018-03-04 23:36 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: William Tu @ 2018-03-02 13:38 UTC (permalink / raw)
  To: Prashant Bhole
  Cc: David S . Miller, Shuah Khan, Florian Westphal,
	Linux Kernel Network Developers

On Thu, Mar 1, 2018 at 6:22 PM, Prashant Bhole
<bhole_prashant_q7@lab.ntt.co.jp> wrote:
> 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>

Thanks for the fix.

Acked-by: William Tu <u9012063@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: rtnetlink: remove testns on test fail
  2018-03-02  2:22 [PATCH net-next] selftests: rtnetlink: remove testns on test fail Prashant Bhole
  2018-03-02 13:38 ` William Tu
@ 2018-03-04 23:36 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-03-04 23:36 UTC (permalink / raw)
  To: bhole_prashant_q7; +Cc: shuah, fw, netdev

From: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Date: Fri,  2 Mar 2018 11:22:20 +0900

> 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>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-04 23:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02  2:22 [PATCH net-next] selftests: rtnetlink: remove testns on test fail Prashant Bhole
2018-03-02 13:38 ` William Tu
2018-03-04 23:36 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.