linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
@ 2019-04-05 16:31 Jeffrin Jose T
  2019-04-05 16:47 ` Florian Westphal
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrin Jose T @ 2019-04-05 16:31 UTC (permalink / raw)
  To: fw; +Cc: shuah, pablo, linu-kselftest, linux-kernel, Jeffrin Jose T

A test for  the basic NAT functionality uses ip command which
needs veth device.There is a condition where the kernel support
for veth is not compiled into the kernel and the test script
breaks.This patch contains code for reasonable error display
and correct code exit.

Signed-off-by: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
---
 tools/testing/selftests/netfilter/nft_nat.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/netfilter/nft_nat.sh b/tools/testing/selftests/netfilter/nft_nat.sh
index 8ec76681605c..f25f72a75cf3 100755
--- a/tools/testing/selftests/netfilter/nft_nat.sh
+++ b/tools/testing/selftests/netfilter/nft_nat.sh
@@ -23,7 +23,11 @@ ip netns add ns0
 ip netns add ns1
 ip netns add ns2
 
-ip link add veth0 netns ns0 type veth peer name eth0 netns ns1
+ip link add veth0 netns ns0 type veth peer name eth0 netns ns1 > /dev/null 2>&1
+if [ $? -ne 0 ];then
+    echo "SKIP: No virtual ethernet pair device support in kernel"
+    exit $ksft_skip
+fi
 ip link add veth1 netns ns0 type veth peer name eth0 netns ns2
 
 ip -net ns0 link set lo up
-- 
2.20.1


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

* Re: [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
  2019-04-05 16:31 [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module Jeffrin Jose T
@ 2019-04-05 16:47 ` Florian Westphal
  2019-04-13 12:39   ` Jeffrin Thalakkottoor
  0 siblings, 1 reply; 8+ messages in thread
From: Florian Westphal @ 2019-04-05 16:47 UTC (permalink / raw)
  To: Jeffrin Jose T; +Cc: fw, shuah, pablo, linu-kselftest, linux-kernel

Jeffrin Jose T <jeffrin@rajagiritech.edu.in> wrote:
> A test for  the basic NAT functionality uses ip command which
> needs veth device.There is a condition where the kernel support
> for veth is not compiled into the kernel and the test script
> breaks.This patch contains code for reasonable error display
> and correct code exit.

Looks good to me, thanks for following up on this.

Acked-by: Florian Westphal <fw@strlen.de>

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

* Re: [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
  2019-04-05 16:47 ` Florian Westphal
@ 2019-04-13 12:39   ` Jeffrin Thalakkottoor
  2019-04-25 19:43     ` shuah
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrin Thalakkottoor @ 2019-04-13 12:39 UTC (permalink / raw)
  To: Shuah Khan; +Cc: Florian Westphal, linu-kselftest, pablo, lkml

Hello Shuah,

did you get the mail related stuff below ?

On Fri, Apr 5, 2019 at 10:17 PM Florian Westphal <fw@strlen.de> wrote:
>
> Jeffrin Jose T <jeffrin@rajagiritech.edu.in> wrote:
> > A test for  the basic NAT functionality uses ip command which
> > needs veth device.There is a condition where the kernel support
> > for veth is not compiled into the kernel and the test script
> > breaks.This patch contains code for reasonable error display
> > and correct code exit.
>
> Looks good to me, thanks for following up on this.
>
> Acked-by: Florian Westphal <fw@strlen.de>



-- 
software engineer
rajagiri school of engineering and technology

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

* Re: [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
  2019-04-13 12:39   ` Jeffrin Thalakkottoor
@ 2019-04-25 19:43     ` shuah
  2019-04-30 10:02       ` Florian Westphal
  0 siblings, 1 reply; 8+ messages in thread
From: shuah @ 2019-04-25 19:43 UTC (permalink / raw)
  To: Jeffrin Thalakkottoor, pablo
  Cc: Florian Westphal, linu-kselftest, lkml, shuah

On 4/13/19 6:39 AM, Jeffrin Thalakkottoor wrote:
> Hello Shuah,
> 
> did you get the mail related stuff below ?
> 

Yes I saw this patch.

> On Fri, Apr 5, 2019 at 10:17 PM Florian Westphal <fw@strlen.de> wrote:
>>
>> Jeffrin Jose T <jeffrin@rajagiritech.edu.in> wrote:
>>> A test for  the basic NAT functionality uses ip command which
>>> needs veth device.There is a condition where the kernel support
>>> for veth is not compiled into the kernel and the test script
>>> breaks.This patch contains code for reasonable error display
>>> and correct code exit.
>>
>> Looks good to me, thanks for following up on this.
>>
>> Acked-by: Florian Westphal <fw@strlen.de>
> 
> 
> 

Pablo,

Would you like me to take this patch through ksleftest tree?
If you want to take this through netfilter tree:

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah


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

* Re: [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
  2019-04-25 19:43     ` shuah
@ 2019-04-30 10:02       ` Florian Westphal
  2019-04-30 10:52         ` Pablo Neira Ayuso
  0 siblings, 1 reply; 8+ messages in thread
From: Florian Westphal @ 2019-04-30 10:02 UTC (permalink / raw)
  To: shuah
  Cc: Jeffrin Thalakkottoor, pablo, Florian Westphal, linu-kselftest, lkml

shuah <shuah@kernel.org> wrote:
> Would you like me to take this patch through ksleftest tree?

Please do, this patch is neither in nf nor nf-next and it looks fine to
me.

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

* Re: [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
  2019-04-30 10:02       ` Florian Westphal
@ 2019-04-30 10:52         ` Pablo Neira Ayuso
  2019-05-11 20:58           ` Jeffrin Thalakkottoor
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Neira Ayuso @ 2019-04-30 10:52 UTC (permalink / raw)
  To: Florian Westphal
  Cc: shuah, Jeffrin Thalakkottoor, linu-kselftest, lkml, netfilter-devel

Cc'ing netfilter-devel@vger.kernel.org

On Tue, Apr 30, 2019 at 12:02:56PM +0200, Florian Westphal wrote:
> shuah <shuah@kernel.org> wrote:
> > Would you like me to take this patch through ksleftest tree?
> 
> Please do, this patch is neither in nf nor nf-next and it looks fine to
> me.

Indeed, thanks.

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

* Re: [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
  2019-04-30 10:52         ` Pablo Neira Ayuso
@ 2019-05-11 20:58           ` Jeffrin Thalakkottoor
  2019-05-14 23:22             ` Pablo Neira Ayuso
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrin Thalakkottoor @ 2019-05-11 20:58 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Florian Westphal, shuah, linu-kselftest, lkml

Hi Pablo,

Please follow up on the mail you sent.
This is for my interest to see my patch upstream

On Tue, Apr 30, 2019 at 4:22 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>
> Cc'ing netfilter-devel@vger.kernel.org
>
> On Tue, Apr 30, 2019 at 12:02:56PM +0200, Florian Westphal wrote:
> > shuah <shuah@kernel.org> wrote:
> > > Would you like me to take this patch through ksleftest tree?
> >
> > Please do, this patch is neither in nf nor nf-next and it looks fine to
> > me.
>
> Indeed, thanks.



-- 
software engineer
rajagiri school of engineering and technology

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

* Re: [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module.
  2019-05-11 20:58           ` Jeffrin Thalakkottoor
@ 2019-05-14 23:22             ` Pablo Neira Ayuso
  0 siblings, 0 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2019-05-14 23:22 UTC (permalink / raw)
  To: Jeffrin Thalakkottoor; +Cc: Florian Westphal, shuah, linu-kselftest, lkml

On Sun, May 12, 2019 at 02:28:07AM +0530, Jeffrin Thalakkottoor wrote:
> Hi Pablo,
> 
> Please follow up on the mail you sent.
> This is for my interest to see my patch upstream

Please, pick a shorter patch subject, I'd suggest something like:

"selftests: netfilter: missing error check when setting up veth interface"

or alike.

Submit your v2 and don't forget to Cc: netfilter-devel@vger.kernel.org

Thanks.

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

end of thread, other threads:[~2019-05-14 23:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-05 16:31 [PATCH] selftests : netfilter: Wrote a error and exit code for a command which needed veth kernel module Jeffrin Jose T
2019-04-05 16:47 ` Florian Westphal
2019-04-13 12:39   ` Jeffrin Thalakkottoor
2019-04-25 19:43     ` shuah
2019-04-30 10:02       ` Florian Westphal
2019-04-30 10:52         ` Pablo Neira Ayuso
2019-05-11 20:58           ` Jeffrin Thalakkottoor
2019-05-14 23:22             ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).