From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding Date: Mon, 23 Jul 2018 09:17:48 -0600 Message-ID: <5af03df3-cad5-161e-31a8-3921fd64b98a@gmail.com> References: <8b30fcb80234d6d0f96e703487cf4a4195fc1c48.1532346504.git.lucien.xin@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, Davide Caratti , idosch@idosch.org To: Xin Long , network dev Return-path: Received: from mail-pf1-f194.google.com ([209.85.210.194]:36418 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388115AbeGWQTe (ORCPT ); Mon, 23 Jul 2018 12:19:34 -0400 Received: by mail-pf1-f194.google.com with SMTP id d14-v6so156840pfo.3 for ; Mon, 23 Jul 2018 08:17:52 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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.