public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Cc: petrm@nvidia.com, razor@blackwall.org,
	Ido Schimmel <idosch@nvidia.com>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH v1 01/11] selftests: forwarding: custom_multipath_hash.sh: add cleanup for SIGTERM sent by timeout
Date: Mon, 31 Jul 2023 15:02:25 +0300	[thread overview]
Message-ID: <ZMei0VMIH/l1GzVM@shredder> (raw)
In-Reply-To: <2f203995-5ae0-13bc-d1a6-997c2b36a2b8@alu.unizg.hr>

On Mon, Jul 31, 2023 at 11:24:27AM +0200, Mirsad Todorovac wrote:
> I guess that means only three are left.
> 
> # ./bridge_mdb.sh
> dev br0 port veth1 grp 239.1.1.1 src 192.0.2.1 temp filter_mode include proto static vid 10  259.99
> TEST: IPv4 (S, G) port group entries configuration tests            [FAIL]
> 	Entry has an unpending group timer after replace
> dev br0 port veth1 grp ff0e::1 src 2001:db8:1::1 temp filter_mode include proto static vid 10  259.99
> TEST: IPv6 (S, G) port group entries configuration tests            [FAIL]
> 	Entry has an unpending group timer after replace

I suspect that what happens here is that you have a faster system
than me or a different HZ value (check CONFIG_HZ, mine is 1000). The
group membership time is probably 260.00 which is why grepping for
"0.00" works when it shouldn't. Can you try the patch below? No need to
run all the other tests.

diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh
index 8493c3dfc01e..41c33a2de0a6 100755
--- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh
@@ -617,7 +617,7 @@ __cfg_test_port_ip_sg()
                grep -q "permanent"
        check_err $? "Entry not added as \"permanent\" when should"
        bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \
-               grep -q "0.00"
+               grep -q " 0.00"
        check_err $? "\"permanent\" entry has a pending group timer"
        bridge mdb del dev br0 port $swp1 $grp_key vid 10
 
@@ -626,7 +626,7 @@ __cfg_test_port_ip_sg()
                grep -q "temp"
        check_err $? "Entry not added as \"temp\" when should"
        bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \
-               grep -q "0.00"
+               grep -q " 0.00"
        check_fail $? "\"temp\" entry has an unpending group timer"
        bridge mdb del dev br0 port $swp1 $grp_key vid 10
 
@@ -659,7 +659,7 @@ __cfg_test_port_ip_sg()
                grep -q "permanent"
        check_err $? "Entry not marked as \"permanent\" after replace"
        bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \
-               grep -q "0.00"
+               grep -q " 0.00"
        check_err $? "Entry has a pending group timer after replace"
 
        bridge mdb replace dev br0 port $swp1 $grp_key vid 10 temp
@@ -667,7 +667,7 @@ __cfg_test_port_ip_sg()
                grep -q "temp"
        check_err $? "Entry not marked as \"temp\" after replace"
        bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \
-               grep -q "0.00"
+               grep -q " 0.00"
        check_fail $? "Entry has an unpending group timer after replace"
        bridge mdb del dev br0 port $swp1 $grp_key vid 10

> # ./bridge_vlan_mcast.sh
> TEST: Vlan mcast_startup_query_interval global option default value   [FAIL]
> 	Wrong default mcast_startup_query_interval global vlan option value
> # ./mirror_gre_changes.sh
> TEST: mirror to gretap: TTL change (skip_hw)                        [FAIL]
> 	Expected to capture 10 packets, got 15.
> TEST: mirror to ip6gretap: TTL change (skip_hw)                     [FAIL]
> 	Expected to capture 10 packets, got 13.
> WARN: Could not test offloaded functionality

I hope Nik and Petr will find the time to look into those. If not, I
will check when I can.

> 
> NOTE: The error happened because two patches collided. This patch
> 
> diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
> index 975fc5168c6334..40a8c1541b7f81 100755
> --- a/tools/testing/selftests/net/forwarding/lib.sh
> +++ b/tools/testing/selftests/net/forwarding/lib.sh
> @@ -30,6 +30,7 @@ REQUIRE_MZ=${REQUIRE_MZ:=yes}
>  REQUIRE_MTOOLS=${REQUIRE_MTOOLS:=no}
>  STABLE_MAC_ADDRS=${STABLE_MAC_ADDRS:=no}
>  TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=}
> +TROUTE6=${TROUTE6:=traceroute6}
>  relative_path="${BASH_SOURCE%/*}"
>  if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then
> 
> and this patch
> 
> diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
> index 71f7c0c49677..5b0183013017 100755
> --- a/tools/testing/selftests/net/forwarding/lib.sh
> +++ b/tools/testing/selftests/net/forwarding/lib.sh
> @@ -16,8 +16,6 @@ TEAMD=${TEAMD:=teamd}
>  WAIT_TIME=${WAIT_TIME:=5}
>  PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no}
>  PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no}
> -NETIF_TYPE=${NETIF_TYPE:=veth}
> -NETIF_CREATE=${NETIF_CREATE:=yes}
>  MCD=${MCD:=smcrouted}
>  MC_CLI=${MC_CLI:=smcroutectl}
>  PING_COUNT=${PING_COUNT:=10}
> @@ -30,6 +28,20 @@ REQUIRE_MZ=${REQUIRE_MZ:=yes}
>  REQUIRE_MTOOLS=${REQUIRE_MTOOLS:=no}
>  STABLE_MAC_ADDRS=${STABLE_MAC_ADDRS:=no}
>  TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=}
> +NETIF_TYPE=${NETIF_TYPE:=veth}
> +NETIF_CREATE=${NETIF_CREATE:=yes}
> +declare -A NETIFS=(
> +       [p1]=veth0
> +       [p2]=veth1
> +       [p3]=veth2
> +       [p4]=veth3
> +       [p5]=veth4
> +       [p6]=veth5
> +       [p7]=veth6
> +       [p8]=veth7
> +       [p9]=veth8
> +       [p10]=veth9
> +)
> 
>  relative_path="${BASH_SOURCE%/*}"
>  if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then
> 
> are not compatible.
> 
> I have applied the 'require_command $TROUTE6' patch manually.
> 
> I suppose this is what you intended to have:
> 
> # Can be overridden by the configuration file.
> PING=${PING:=ping}
> PING6=${PING6:=ping6}
> MZ=${MZ:=mausezahn}
> ARPING=${ARPING:=arping}
> TEAMD=${TEAMD:=teamd}
> WAIT_TIME=${WAIT_TIME:=5}
> PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no}
> PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no}
> MCD=${MCD:=smcrouted}
> MC_CLI=${MC_CLI:=smcroutectl}
> PING_COUNT=${PING_COUNT:=10}
> PING_TIMEOUT=${PING_TIMEOUT:=5}
> WAIT_TIMEOUT=${WAIT_TIMEOUT:=20}
> INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600}
> LOW_AGEING_TIME=${LOW_AGEING_TIME:=1000}
> REQUIRE_JQ=${REQUIRE_JQ:=yes}
> REQUIRE_MZ=${REQUIRE_MZ:=yes}
> REQUIRE_MTOOLS=${REQUIRE_MTOOLS:=no}
> STABLE_MAC_ADDRS=${STABLE_MAC_ADDRS:=no}
> TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=}
> TROUTE6=${TROUTE6:=traceroute6}
> NETIF_TYPE=${NETIF_TYPE:=veth}
> NETIF_CREATE=${NETIF_CREATE:=yes}
> declare -A NETIFS=(
>        [p1]=veth0
>        [p2]=veth1
>        [p3]=veth2
>        [p4]=veth3
>        [p5]=veth4
>        [p6]=veth5
>        [p7]=veth6
>        [p8]=veth7
>        [p9]=veth8
>        [p10]=veth9
> )
> 
> relative_path="${BASH_SOURCE%/*}"
> if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then
>         relative_path="."
> fi
> ------------------------------------------------
> 
> Probably for the production patch you would like to have this fixed.

No, I don't intend to submit the patch that automatically creates the
veth pairs. It is superseded by "selftests: forwarding: Skip test when
no interfaces are specified".

  reply	other threads:[~2023-07-31 12:02 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22  0:36 [PATCH v1 01/11] selftests: forwarding: custom_multipath_hash.sh: add cleanup for SIGTERM sent by timeout Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 02/11] selftests: forwarding: gre_custom_multipath_hash.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 03/11] selftests: forwarding: gre_inner_v4_multipath.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 04/11] selftests: forwarding: gre_multipath_nh_res.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 05/11] selftests: forwarding: gre_multipath_nh.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 06/11] selftests: forwarding: ip6gre_custom_multipath_hash.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 07/11] selftests: forwarding: ip6gre_inner_v4_multipath.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 08/11] selftests: forwarding: no_forwarding.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 09/11] selftests: forwarding: router_mpath_nh_res.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 10/11] selftests: forwarding: router_mpath_nh.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 11/11] selftests: forwarding: router_multipath.sh: " Mirsad Todorovac
2023-07-23  8:25 ` [PATCH v1 01/11] selftests: forwarding: custom_multipath_hash.sh: " Ido Schimmel
2023-07-23 17:27   ` Ido Schimmel
2023-07-23 18:50     ` Mirsad Todorovac
2023-07-23 18:54   ` Mirsad Todorovac
2023-07-23 21:37     ` Mirsad Todorovac
2023-07-24 14:45       ` Ido Schimmel
2023-07-24 20:46         ` Mirsad Todorovac
2023-07-26 12:22           ` Ido Schimmel
2023-07-26 16:57             ` Ido Schimmel
2023-07-27  3:48               ` Mirsad Todorovac
2023-07-27 19:26             ` Mirsad Todorovac
2023-07-30  7:53               ` Ido Schimmel
2023-07-30 16:48                 ` Mirsad Todorovac
2023-07-31  7:54                   ` Ido Schimmel
2023-07-31  9:24                     ` Mirsad Todorovac
2023-07-31 12:02                       ` Ido Schimmel [this message]
2023-07-31 15:13                         ` Mirsad Todorovac
2023-07-31 15:48                           ` Ido Schimmel
2023-08-01 20:41                             ` Mirsad Todorovac
2023-07-31 15:23                         ` Mirsad Todorovac
2023-08-01 11:08                 ` Petr Machata
2023-08-01 16:54                   ` Mirsad Todorovac
2023-08-02 10:33                     ` Petr Machata
2023-08-02 11:06                       ` Mirsad Todorovac
2023-07-25  8:44 ` Petr Machata
2023-07-25 16:23   ` Mirsad Todorovac

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=ZMei0VMIH/l1GzVM@shredder \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mirsad.todorovac@alu.unizg.hr \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=shuah@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