All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/net: correct the return value for run_afpackettests
@ 2019-04-19 11:01 ` po-hsu.lin
  0 siblings, 0 replies; 9+ messages in thread
From: Po-Hsu Lin @ 2019-04-19 11:01 UTC (permalink / raw)
  To: shuah, davem; +Cc: linux-kselftest, netdev, linux-kernel

The run_afpackettests will be marked as passed regardless the return
value of those sub-tests in the script:
    --------------------
    running psock_tpacket test
    --------------------
    [FAIL]
    selftests: run_afpackettests [PASS]

Fix this by changing the return value for each tests.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 tools/testing/selftests/net/run_afpackettests | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/net/run_afpackettests b/tools/testing/selftests/net/run_afpackettests
index 2dc95fd..ea5938e 100755
--- a/tools/testing/selftests/net/run_afpackettests
+++ b/tools/testing/selftests/net/run_afpackettests
@@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
 	exit 0
 fi
 
+ret=0
 echo "--------------------"
 echo "running psock_fanout test"
 echo "--------------------"
 ./in_netns.sh ./psock_fanout
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
@@ -22,6 +24,7 @@ echo "--------------------"
 ./in_netns.sh ./psock_tpacket
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
@@ -32,6 +35,8 @@ echo "--------------------"
 ./in_netns.sh ./txring_overwrite
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
+exit $ret
-- 
2.7.4

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

* [PATCH] selftests/net: correct the return value for run_afpackettests
@ 2019-04-19 11:01 ` po-hsu.lin
  0 siblings, 0 replies; 9+ messages in thread
From: po-hsu.lin @ 2019-04-19 11:01 UTC (permalink / raw)


The run_afpackettests will be marked as passed regardless the return
value of those sub-tests in the script:
    --------------------
    running psock_tpacket test
    --------------------
    [FAIL]
    selftests: run_afpackettests [PASS]

Fix this by changing the return value for each tests.

Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
---
 tools/testing/selftests/net/run_afpackettests | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/net/run_afpackettests b/tools/testing/selftests/net/run_afpackettests
index 2dc95fd..ea5938e 100755
--- a/tools/testing/selftests/net/run_afpackettests
+++ b/tools/testing/selftests/net/run_afpackettests
@@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
 	exit 0
 fi
 
+ret=0
 echo "--------------------"
 echo "running psock_fanout test"
 echo "--------------------"
 ./in_netns.sh ./psock_fanout
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
@@ -22,6 +24,7 @@ echo "--------------------"
 ./in_netns.sh ./psock_tpacket
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
@@ -32,6 +35,8 @@ echo "--------------------"
 ./in_netns.sh ./txring_overwrite
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
+exit $ret
-- 
2.7.4

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

* [PATCH] selftests/net: correct the return value for run_afpackettests
@ 2019-04-19 11:01 ` po-hsu.lin
  0 siblings, 0 replies; 9+ messages in thread
From: Po-Hsu Lin @ 2019-04-19 11:01 UTC (permalink / raw)


The run_afpackettests will be marked as passed regardless the return
value of those sub-tests in the script:
    --------------------
    running psock_tpacket test
    --------------------
    [FAIL]
    selftests: run_afpackettests [PASS]

Fix this by changing the return value for each tests.

Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
---
 tools/testing/selftests/net/run_afpackettests | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/net/run_afpackettests b/tools/testing/selftests/net/run_afpackettests
index 2dc95fd..ea5938e 100755
--- a/tools/testing/selftests/net/run_afpackettests
+++ b/tools/testing/selftests/net/run_afpackettests
@@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
 	exit 0
 fi
 
+ret=0
 echo "--------------------"
 echo "running psock_fanout test"
 echo "--------------------"
 ./in_netns.sh ./psock_fanout
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
@@ -22,6 +24,7 @@ echo "--------------------"
 ./in_netns.sh ./psock_tpacket
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
@@ -32,6 +35,8 @@ echo "--------------------"
 ./in_netns.sh ./txring_overwrite
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
+	ret=1
 else
 	echo "[PASS]"
 fi
+exit $ret
-- 
2.7.4

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

* Re: [PATCH] selftests/net: correct the return value for run_afpackettests
  2019-04-19 11:01 ` po-hsu.lin
  (?)
@ 2019-04-19 21:40   ` davem
  -1 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-04-19 21:40 UTC (permalink / raw)
  To: po-hsu.lin; +Cc: shuah, linux-kselftest, netdev, linux-kernel

From: Po-Hsu Lin <po-hsu.lin@canonical.com>
Date: Fri, 19 Apr 2019 19:01:13 +0800

> The run_afpackettests will be marked as passed regardless the return
> value of those sub-tests in the script:
>     --------------------
>     running psock_tpacket test
>     --------------------
>     [FAIL]
>     selftests: run_afpackettests [PASS]
> 
> Fix this by changing the return value for each tests.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>

Applied, thank you.

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

* [PATCH] selftests/net: correct the return value for run_afpackettests
@ 2019-04-19 21:40   ` davem
  0 siblings, 0 replies; 9+ messages in thread
From: davem @ 2019-04-19 21:40 UTC (permalink / raw)


From: Po-Hsu Lin <po-hsu.lin at canonical.com>
Date: Fri, 19 Apr 2019 19:01:13 +0800

> The run_afpackettests will be marked as passed regardless the return
> value of those sub-tests in the script:
>     --------------------
>     running psock_tpacket test
>     --------------------
>     [FAIL]
>     selftests: run_afpackettests [PASS]
> 
> Fix this by changing the return value for each tests.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>

Applied, thank you.

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

* [PATCH] selftests/net: correct the return value for run_afpackettests
@ 2019-04-19 21:40   ` davem
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-04-19 21:40 UTC (permalink / raw)


From: Po-Hsu Lin <po-hsu.lin@canonical.com>
Date: Fri, 19 Apr 2019 19:01:13 +0800

> The run_afpackettests will be marked as passed regardless the return
> value of those sub-tests in the script:
>     --------------------
>     running psock_tpacket test
>     --------------------
>     [FAIL]
>     selftests: run_afpackettests [PASS]
> 
> Fix this by changing the return value for each tests.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>

Applied, thank you.

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

* Re: [PATCH] selftests/net: correct the return value for run_afpackettests
  2019-04-19 11:01 ` po-hsu.lin
  (?)
@ 2019-04-21  3:29   ` davem
  -1 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-04-21  3:29 UTC (permalink / raw)
  To: po-hsu.lin; +Cc: shuah, linux-kselftest, netdev, linux-kernel

From: Po-Hsu Lin <po-hsu.lin@canonical.com>
Date: Fri, 19 Apr 2019 19:01:13 +0800

> The run_afpackettests will be marked as passed regardless the return
> value of those sub-tests in the script:
>     --------------------
>     running psock_tpacket test
>     --------------------
>     [FAIL]
>     selftests: run_afpackettests [PASS]
> 
> Fix this by changing the return value for each tests.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>

Applied, thanks.

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

* [PATCH] selftests/net: correct the return value for run_afpackettests
@ 2019-04-21  3:29   ` davem
  0 siblings, 0 replies; 9+ messages in thread
From: davem @ 2019-04-21  3:29 UTC (permalink / raw)


From: Po-Hsu Lin <po-hsu.lin at canonical.com>
Date: Fri, 19 Apr 2019 19:01:13 +0800

> The run_afpackettests will be marked as passed regardless the return
> value of those sub-tests in the script:
>     --------------------
>     running psock_tpacket test
>     --------------------
>     [FAIL]
>     selftests: run_afpackettests [PASS]
> 
> Fix this by changing the return value for each tests.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>

Applied, thanks.

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

* [PATCH] selftests/net: correct the return value for run_afpackettests
@ 2019-04-21  3:29   ` davem
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-04-21  3:29 UTC (permalink / raw)


From: Po-Hsu Lin <po-hsu.lin@canonical.com>
Date: Fri, 19 Apr 2019 19:01:13 +0800

> The run_afpackettests will be marked as passed regardless the return
> value of those sub-tests in the script:
>     --------------------
>     running psock_tpacket test
>     --------------------
>     [FAIL]
>     selftests: run_afpackettests [PASS]
> 
> Fix this by changing the return value for each tests.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>

Applied, thanks.

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

end of thread, other threads:[~2019-04-21  3:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19 11:01 [PATCH] selftests/net: correct the return value for run_afpackettests Po-Hsu Lin
2019-04-19 11:01 ` Po-Hsu Lin
2019-04-19 11:01 ` po-hsu.lin
2019-04-19 21:40 ` David Miller
2019-04-19 21:40   ` David Miller
2019-04-19 21:40   ` davem
2019-04-21  3:29 ` David Miller
2019-04-21  3:29   ` David Miller
2019-04-21  3:29   ` davem

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.