netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
	Davide Caratti <dcaratti@redhat.com>,
	Ido Schimmel <idosch@idosch.org>
Subject: Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding
Date: Wed, 25 Jul 2018 01:55:21 +0800	[thread overview]
Message-ID: <CADvbK_eje4O7ykBzZGQ_Yrg1Y-kaFfH58GcbAtBkGDqwft9GxQ@mail.gmail.com> (raw)
In-Reply-To: <ae804f04-2be2-e79d-5f43-033e275fbd66@gmail.com>

On Wed, Jul 25, 2018 at 1:37 AM, David Ahern <dsahern@gmail.com> wrote:
> On 7/24/18 11:24 AM, Xin Long wrote:
>> On Mon, Jul 23, 2018 at 11:17 PM, David Ahern <dsahern@gmail.com> wrote:
>>> On 7/23/18 5:51 AM, Xin Long wrote:
>>>> +ping_ipv4()
>>>> +{
>>>> +     sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0
>>>> +
>>>> +     bc_forwarding_disable
>>>> +     ping_test_from $h1 198.51.100.255 192.0.2.1
>>>> +     ping_test_from $h1 198.51.200.255 192.0.2.1
>>>> +     ping_test_from $h1 192.0.2.255 192.0.2.1
>>>> +     ping_test_from $h1 255.255.255.255 192.0.2.1
>>>> +
>>>> +     ping_test_from $h2 192.0.2.255 198.51.100.1
>>>> +     ping_test_from $h2 198.51.200.255 198.51.100.1
>>>> +     ping_test_from $h2 198.51.100.255 198.51.100.1
>>>> +     ping_test_from $h2 255.255.255.255 198.51.100.1
>>>> +     bc_forwarding_restore
>>>> +
>>>> +     bc_forwarding_enable
>>>> +     ping_test_from $h1 198.51.100.255 198.51.100.2
>>>> +     ping_test_from $h1 198.51.200.255 198.51.200.2
>>>> +     ping_test_from $h1 192.0.2.255 192.0.2.1 1
>>>> +     ping_test_from $h1 255.255.255.255 192.0.2.1
>>>> +
>>>> +     ping_test_from $h2 192.0.2.255 192.0.2.2
>>>> +     ping_test_from $h2 198.51.200.255 198.51.200.2
>>>> +     ping_test_from $h2 198.51.100.255 198.51.100.1 1
>>>> +     ping_test_from $h2 255.255.255.255 198.51.100.1
>>>> +     bc_forwarding_restore
>>>> +
>>>> +     sysctl_restore net.ipv4.icmp_echo_ignore_broadcasts
>>>
>>> You need a better description for each test. This output:
>>> TEST: ping_test_from                            [PASS]
>>> TEST: ping_test_from                            [PASS]
>>> TEST: ping_test_from                            [PASS]
>>> TEST: ping_test_from                            [PASS]
>>> ...
>>>
>>> does not help in understanding which cases are working and which are not.
>> # ./router_broadcast.sh
>> INFO: bc_forwarding disabled on r1=>
>> INFO: h1 -> net2: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h1 -> net3: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h1 -> net1: reply from r1 (not dropping)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h1 -> 255.255.255.255: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> net1: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> net3: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> net2: reply from r1 (not dropping)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> 255.255.255.255: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: bc_forwarding enabled on r1 =>
>> INFO: h1 -> net2: reply from h2 (forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h1 -> net3: reply from h3 (forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h1 -> net1: no reply (dropping)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h1 -> 255.255.255.255: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> net1: reply from h3 (forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> net3: reply from h1 (forwarding)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> net2: no reply (dropping)
>> TEST: ping_test_from                                                [PASS]
>> INFO: h2 -> 255.255.255.255: reply from r1 (not forwarding)
>> TEST: ping_test_from                                                [PASS]
>>
>> I hope this log looks good to you?
>>
>
> The extra INFO is good, but the TEST line needs a better description.
>
INFO: bc_forwarding disabled on r1 =>
INFO: h1 -> net2: reply from r1 (not forwarding)
TEST: ping 198.51.100.255, expected reply from 192.0.2.1            [PASS]
INFO: h1 -> net3: reply from r1 (not forwarding)
TEST: ping 198.51.200.255, expected reply from 192.0.2.1            [PASS]
INFO: h1 -> net1: reply from r1 (not dropping)
TEST: ping 192.0.2.255, expected reply from 192.0.2.1               [PASS]
....
how about this?

  reply	other threads:[~2018-07-24 19:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 11:51 [PATCHv3 net-next 0/2] route: add support and selftests for directed broadcast forwarding Xin Long
2018-07-23 11:51 ` [PATCHv3 net-next 1/2] route: add support " Xin Long
2018-07-23 11:51   ` [PATCHv3 net-next 2/2] selftests: add a selftest " Xin Long
2018-07-23 15:17     ` David Ahern
2018-07-24 17:24       ` Xin Long
2018-07-24 17:37         ` David Ahern
2018-07-24 17:55           ` Xin Long [this message]
2018-07-24 18:36             ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADvbK_eje4O7ykBzZGQ_Yrg1Y-kaFfH58GcbAtBkGDqwft9GxQ@mail.gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=idosch@idosch.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).