From patchwork Thu Oct 29 06:39:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 1389858 X-Patchwork-Delegate: mathew.j.martineau@linux.intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vcdHZFKj; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CMG5f3trnz9sPB for ; Thu, 29 Oct 2020 17:40:06 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B4F8D1638992F; Wed, 28 Oct 2020 23:40:04 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::42a; helo=mail-pf1-x42a.google.com; envelope-from=geliangtang@gmail.com; receiver= Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BF43816389920 for ; Wed, 28 Oct 2020 23:40:02 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id b3so1542171pfo.2 for ; Wed, 28 Oct 2020 23:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8BQJEOT332xp4r7J36pkDDBwL0AHdyd5dRehP4He6n8=; b=vcdHZFKjZfj8df8mWHL3E6w2TymgH2iwYOAa0v7fubBcf+P7fZe3Njm9Ehhn8R2KPl K2e3rRlAEmyQ6fkk7p/Pae3lB6orUt7PFsSCMKgjfGpBPoUZbB9IFJdm4FN4ABf3I8pK Qqw3foK/63ybP3avAWXifhTNA5BAe7R/wTofFzggoAxpbB4+0EN9e9yxy65s3dFVGZn8 LLB1w3Og2/3mfAqrZLIfm9xxdUuKy81YRNQ192lXGNy5xOhHYLmEad89SxB0W8XlN8jv EbTw31X0gd6xJaoQjyV16xBAhkHXNlvDiSwJOVxlbO0TRNEujQMX9/IN8ecLjUCr5A6T JtpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8BQJEOT332xp4r7J36pkDDBwL0AHdyd5dRehP4He6n8=; b=MGNqFKPvucIiYxZxSO4G2NRe8BMSPwq+BLoGcx7l4L/XxW7cdsw0ZsNGohaCIqwJae fcEVWnzadla247q5OXiWROsM5+9BcpDi7uFmqobEw4jwqljqdHYdqW7qQxVZK2lrY1o5 tdiG/X99BatwFlolZ+KtDXelwF3JULwJ4pVt3ZpA5Jocv/zxAcMZQH6hpJv+3z7dhVmZ 03mQn6xe+OlLRZnIkYz4GqKbHGG+GBc30zjtAPubynrAq0loG6w1fqdS0ATBOC6ypdeI 9pUzWl4Iq2OoXAS9na3UhgbnjzmmmJK6OBwNUS+2lHki+nybhbSZMNB3jX3NFhKVFr4G 5OmQ== X-Gm-Message-State: AOAM532snnh2gRdZ6gx3C5HQTHs6PP4Zd+MP5b/+XFJQ0xtVvA/VdSsm UMrjQLcZuhcJYlUX11L+k9ntTQr/QLnqsA== X-Google-Smtp-Source: ABdhPJzndCUPJjuJ4S3XkGv5rYszW48CBFPAGLW+xxcbwPW3sgx+dlwk5RQnWZeNobmvZtyHdhibUQ== X-Received: by 2002:a17:90b:a05:: with SMTP id gg5mr2822457pjb.227.1603953602022; Wed, 28 Oct 2020 23:40:02 -0700 (PDT) Received: from localhost ([2400:8800:300:11c:18a:42ae:244a:91a5]) by smtp.gmail.com with ESMTPSA id v3sm1429614pju.38.2020.10.28.23.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 23:40:01 -0700 (PDT) From: Geliang Tang To: mptcp@lists.01.org Date: Thu, 29 Oct 2020 14:39:28 +0800 Message-Id: <19324d5229646e70adb89dc08fd29637cdcd5613.1603952836.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <74a7932cdf68d481379e0910f511b4ef017661ce.1603952836.git.geliangtang@gmail.com> References: <28c900686b7ce170435daec8d9cd71527636a8af.1603952836.git.geliangtang@gmail.com> <17fe96fa273fe2ed8d0d0f76b37187bbe8f0c99e.1603952836.git.geliangtang@gmail.com> <443a19151dd71160ce92b6ab3dbc6a62e4cdddd8.1603952836.git.geliangtang@gmail.com> <1c2111f713f72610a59400b5c821f09e53485134.1603952836.git.geliangtang@gmail.com> <74a7932cdf68d481379e0910f511b4ef017661ce.1603952836.git.geliangtang@gmail.com> MIME-Version: 1.0 Message-ID-Hash: NOOR5J3EJ5WCUCJLYIS7Z2RLWWWCJ7KE X-Message-ID-Hash: NOOR5J3EJ5WCUCJLYIS7Z2RLWWWCJ7KE X-MailFrom: geliangtang@gmail.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address CC: Geliang Tang X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [MPTCP][PATCH mptcp-next 8/8] selftests: mptcp: add testcases for ADD_ADDR with port List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: This patch added testcases for ADD_ADDR with port. Signed-off-by: Geliang Tang --- .../testing/selftests/net/mptcp/mptcp_join.sh | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 0eae628d1ffd..826d662a9bf8 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -212,6 +212,7 @@ do_transfer() rm_nr_ns1="$7" rm_nr_ns2="$8" speed="$9" + with_port="${10}" port=$((10000+$TEST_COUNT)) TEST_COUNT=$((TEST_COUNT+1)) @@ -253,6 +254,11 @@ do_transfer() -s ${srv_proto} ${local_addr} < "$sin" > "$sout" & spid=$! + if [ "$with_port" -gt 0 ];then + ip netns exec ${listener_ns} $mptcp_connect -t $timeout -l -p $with_port \ + -s ${srv_proto} ${local_addr} < "$sin" > "$sout" & + fi + sleep 1 if [ "$test_link_fail" -eq 0 ];then @@ -348,6 +354,7 @@ run_tests() rm_nr_ns1="${5:-0}" rm_nr_ns2="${6:-0}" speed="${7:-fast}" + with_port="${8:-0}" lret=0 oldin="" @@ -362,7 +369,7 @@ run_tests() fi do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} \ - ${test_linkfail} ${rm_nr_ns1} ${rm_nr_ns2} ${speed} + ${test_linkfail} ${rm_nr_ns1} ${rm_nr_ns2} ${speed} ${with_port} lret=$? if [ "$test_linkfail" -eq 1 ];then @@ -717,6 +724,23 @@ chk_join_nr "remove subflow and signal IPv6" 2 2 2 chk_add_nr 1 1 chk_rm_nr 1 1 +# subflow with port +reset +ip netns exec $ns1 ./pm_nl_ctl limits 0 1 +ip netns exec $ns2 ./pm_nl_ctl limits 0 1 +ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow port 10100 +run_tests $ns1 $ns2 10.0.1.1 +chk_join_nr "single subflow with port" 1 1 1 + +# signal address with port +reset +ip netns exec $ns1 ./pm_nl_ctl limits 0 1 +ip netns exec $ns2 ./pm_nl_ctl limits 1 1 +ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal port 10100 +run_tests $ns1 $ns2 10.0.1.1 0 0 0 fast 10100 +chk_join_nr "signal address with port" 1 1 1 +chk_add_nr 1 1 + # single subflow, syncookies reset_with_cookies ip netns exec $ns1 ./pm_nl_ctl limits 0 1