From nobody Tue May 21 16:20:10 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0EC26AA0 for ; Fri, 23 Jun 2023 12:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687522822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mX02EQjfhnvNS52lhiZUHESdDzM2wywpph+bQHFJGEw=; b=HqVTrwztXwG4lQUBOjmAWzwUhi46EzCGtNzQG18PF6BcB7RS0IaweddhYst3G7RM5yKT9v e7bDXN00Lwi+oIh/J7loIwhrvZlYsq6huWvwuXFCi2ozvfyDxZ4XcfE19R9OT6SeOCjdE3 YL9XXsozbtTAOSOrf4C/LZEgYcZygwI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-500-ic0HvJDqMSC6QC2RFc0Bxg-1; Fri, 23 Jun 2023 08:20:19 -0400 X-MC-Unique: ic0HvJDqMSC6QC2RFc0Bxg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C7141C06EE2; Fri, 23 Jun 2023 12:20:18 +0000 (UTC) Received: from renaissance-vector.redhat.com (unknown [10.39.194.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E3E3422B0; Fri, 23 Jun 2023 12:20:16 +0000 (UTC) From: Andrea Claudi To: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mptcp@lists.linux.dev, matthieu.baerts@tessares.net, martineau@kernel.org, geliang.tang@suse.com Subject: [PATCH net 1/2] selftests: mptcp: join: fix 'delete and re-add' test Date: Fri, 23 Jun 2023 14:19:51 +0200 Message-ID: <927493b7ba79d647668e95a34007f48e87c0992a.1687522138.git.aclaudi@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Content-Type: text/plain; charset="utf-8" mptcp_join '002 delete and re-add' test currently fails in the 'after delete' testcase. This happens because endpoint delete includes an ip address while id is not 0, contrary to what is indicated in the ip mptcp man page: "When used with the delete id operation, an IFADDR is only included when the ID is 0." This fixes the issue simply not using the $addr variable in pm_nl_del_endpoint(). Fixes: 34aa6e3bccd8 ("selftests: mptcp: add ip mptcp wrappers") Signed-off-by: Andrea Claudi --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 0ae8cafde439..5424dcacfffa 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -678,7 +678,7 @@ pm_nl_del_endpoint() local addr=3D$3 =20 if [ $ip_mptcp -eq 1 ]; then - ip -n $ns mptcp endpoint delete id $id $addr + ip -n $ns mptcp endpoint delete id $id else ip netns exec $ns ./pm_nl_ctl del $id $addr fi --=20 2.41.0 From nobody Tue May 21 16:20:10 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6509979CF for ; Fri, 23 Jun 2023 12:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687522825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7w28TmyVUkzxBrhSnDkK83nu5AG7TtMwzVrLBGQioEg=; b=Dt2qvk4WRbi7+pPF3210k2dnhWB/6/IyUbFgH/Fnirz5l5crGgUHw7WBjG5REWAnxGRT74 Zw/TKE0R9ll5SFfuBkkCTL6OcK+ZKKqlvItDS87C2CH0tjPW246S0bdm5hLGdj3WQA6VvW aIkIYcXnwOCyEv8VvaGkGsq8lQsHuLs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-124-3cnU_LpROiOZ9NZwEaM36Q-1; Fri, 23 Jun 2023 08:20:22 -0400 X-MC-Unique: 3cnU_LpROiOZ9NZwEaM36Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D1BC29A9D35; Fri, 23 Jun 2023 12:20:21 +0000 (UTC) Received: from renaissance-vector.redhat.com (unknown [10.39.194.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B5ABF41C8; Fri, 23 Jun 2023 12:20:18 +0000 (UTC) From: Andrea Claudi To: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mptcp@lists.linux.dev, matthieu.baerts@tessares.net, martineau@kernel.org, geliang.tang@suse.com Subject: [PATCH net 2/2] selftests: mptcp: join: fix 'implicit EP' test Date: Fri, 23 Jun 2023 14:19:52 +0200 Message-ID: <70e1c8044096af86ed19ee5b4068dd8ce15aad30.1687522138.git.aclaudi@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Content-Type: text/plain; charset="utf-8" mptcp_join '001 implicit EP' test currently fails because of two reasons: - iproute v6.3.0 does not support the implicit flag, fixed with iproute2-next commit 3a2535a41854 ("mptcp: add support for implicit flag") - pm_nl_check_endpoint wrongly expects the ip address to be repeated two times in iproute output, and does not account for a final whitespace in it. This fixes the issue trimming the whitespace in the output string and removing the double address in the expected string. Fixes: 69c6ce7b6eca ("selftests: mptcp: add implicit endpoint test case") Signed-off-by: Andrea Claudi --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 5424dcacfffa..6c3525e42273 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -768,10 +768,11 @@ pm_nl_check_endpoint() fi =20 if [ $ip_mptcp -eq 1 ]; then + # get line and trim trailing whitespace line=3D$(ip -n $ns mptcp endpoint show $id) + line=3D"${line% }" # the dump order is: address id flags port dev - expected_line=3D"$addr" - [ -n "$addr" ] && expected_line=3D"$expected_line $addr" + [ -n "$addr" ] && expected_line=3D"$addr" expected_line=3D"$expected_line $id" [ -n "$_flags" ] && expected_line=3D"$expected_line ${_flags//","/" "}" [ -n "$dev" ] && expected_line=3D"$expected_line $dev" --=20 2.41.0