From patchwork Sat Nov 16 12:59:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196102 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="RkEKGU/F"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 47Fb0c2VxKz9sP3 for ; Sun, 17 Nov 2019 00:00:00 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E44C2100DC3DE; Sat, 16 Nov 2019 05:01:12 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::436; helo=mail-wr1-x436.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 68564100EA52D for ; Sat, 16 Nov 2019 05:01:11 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id b3so13882281wrs.13 for ; Sat, 16 Nov 2019 04:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alPuC/rYnYqJhQKK6g4mOpc/162jbTKuDezaiPs8l/Q=; b=RkEKGU/FceWvYVtAnPURvuzzklFEncDDatItzoTkAttSGDCtPgwL2bNTldQkhWvZ/q DP3qlxmyR6L+k4OCcbJHwtOiht08Km85EzEvh58PdzEp2uJO+H6lKVsTrE6fQ+58spSK qvbIDFZK8A2wFvIqG7uaaFlOkpFDsVPQNk3M2gtRu9B8ftEgX1Ptkae26EjV3k35UYFt YpRgwiBpjozspFWib0vyngqWtlxVHG64Waf4bWjo6l15jaCe0lzxO+hFMrHUAfezws/l SCjpvbwmF16DMtoS7nGKVZhfyslY58HNU2qL5b2/DbgU/X3q//NAvUS3hbwr95btPdMl M6vg== 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=alPuC/rYnYqJhQKK6g4mOpc/162jbTKuDezaiPs8l/Q=; b=EKGsuFUmjmBXYQ46I3jT9XAsWnV+IxNj2RnHwkagiaPUOGJIVHf3qoNOwrZn5D5gTW 487BFm+QBP/gfmkddpDQ5PghFzhPurLTWfgif7ZmjhA2eNHs1lAjyUUBn9GWE7eDe0Ip 9Buv6bvJIPJXLaOr+FVtKE+ergR04PjQA2bYZ1GLkedIqZezTQwSx5+AJcNwXjNxHWUr dt3WGw++oooeTLhDwgg1L4MQx71WN/mq6zjR5GroSjRVkAIYSqvp9Y9ubSMGTnhyHUyK SktItzztmyzpyNkHC6/lCEgjA/ThWIj3GR3m/SJ7UGK3G9IVL0wH+HqBWMEUCMUdwgmO jOQw== X-Gm-Message-State: APjAAAVKCdCtKCfE4nLTY/NEuz9f6mZceVlpHkwxU46RviEHG8hGJi16 P5rteUQUXcX4L+MAjNGySNAcNN8Odts= X-Google-Smtp-Source: APXvYqylz9GRgGnSlff3Y0i9qkZsN2cLof1gxBPi1fDZ/ctUQgkdOdqGM63gKg1qkLiaRpZsmT27Zw== X-Received: by 2002:adf:f084:: with SMTP id n4mr13468925wro.369.1573909194922; Sat, 16 Nov 2019 04:59:54 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.04.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 04:59:54 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:27 +0100 Message-Id: <20191116125936.3563275-2-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: 4CMCEYMETPNFLHTOAIQ6LCBC3FILR2OW X-Message-ID-Hash: 4CMCEYMETPNFLHTOAIQ6LCBC3FILR2OW X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 01/10] selftests:mptcp: fix typo List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: This parameter is only used in case of error. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index b5367fe2c6ea..b51cea35e5c4 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -466,7 +466,7 @@ for sender in "$ns1" "$ns2" "$ns3" "$ns4";do do_ping "$ns3" $sender 10.0.3.2 $ipv6 && do_ping "$ns3" $sender dead:beef:3::2 - do_ping ns4 $sender 10.0.3.1 + do_ping "$ns4" $sender 10.0.3.1 $ipv6 && do_ping "$ns4" $sender dead:beef:3::1 done From patchwork Sat Nov 16 12:59:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196104 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="yF4JNggu"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 47Fb0c5TZyz9sP6 for ; Sun, 17 Nov 2019 00:00:00 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id ED4E8100DC3E2; Sat, 16 Nov 2019 05:01:13 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::42c; helo=mail-wr1-x42c.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 5A449100EA52D for ; Sat, 16 Nov 2019 05:01:12 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id l7so13894609wrp.6 for ; Sat, 16 Nov 2019 04:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tp0HAz3aC6oOKcbwP4V69PsgbRxZdHZbe1wmXx0hT1c=; b=yF4JNggu5BLVpKTw9OTorfUudDLZ/UpL9qW/0MHjfT0ZCnchEp5HEiCyDCwQYgYI1M HXuiIC6JDrdGzpOnXeywkH9fAk04SzUtSV5A75lzEpKG3eyjpS80iU8X/OJGRHbc+UBe 2Q3lRQ99gEs4Kr6V6noNK6B7BAb0Bsijt3Axzjf7hFH3fYt2qW/FrZ1qTo0xTYIRnVIs NHbe9NOsya6LiBVcNpbWqU0Liooh8LVABo2xsOxdatWuajx10LwjBpZIQ/rfpqdiyc8B NRZci5BU75FrKz9CwiK4+yugEhdBbfpTdo8RZ20//ENbB6rTeKbeHgULwDxtivPU5JUd RcRw== 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=tp0HAz3aC6oOKcbwP4V69PsgbRxZdHZbe1wmXx0hT1c=; b=EeTbNd4j1PVBKDbXcpizf00G7/DbhXgailSwym0i/F0oq6d2HZ3KUREL2eqcypu26u qTAzdfo9ux40jP4+VOSO5E/KrvCskkIwRJWoRjOs/t7yze21x4p4N4Xs5r8D4tB3h12R D1TQ6khW7y9FZENY3gzfAHIVLnpk8KrWrFTKpa1o5h5bg57Z0XyyYDCl35t+4ANyAf/J TR1haVZa8cHLO5WIfCqfY26epyxU7WoV7eS4t6AvgfNx72nSeMNQyBPi8Qcy03FeVs+U ksW3gFzPl1s4+IXKce9CMsrG1eT6hRQG2h/IXD3ZTf7R7wr3cG3aCGi73LTIUulNS+e2 L7BA== X-Gm-Message-State: APjAAAUKFjPUtpKmMIyDgXV0EK6YgTph6dQJx+SBYpUv6gHS0TTL/qDh xSYTBJ/ue5hYWhg5lPdAj+OddRzO41nSNw== X-Google-Smtp-Source: APXvYqw92XAIr9lFTYHN4XAnvABf+QwQJiGbIX9v2+9HfpEPLRwtjBv2YQdg82hta7tR7ecrn7gshw== X-Received: by 2002:a05:6000:12c7:: with SMTP id l7mr21042161wrx.128.1573909195803; Sat, 16 Nov 2019 04:59:55 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.04.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 04:59:55 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:28 +0100 Message-Id: <20191116125936.3563275-3-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: IPRNUHLN3ZPHOYJMS6RAX3EKLXYEC6QW X-Message-ID-Hash: IPRNUHLN3ZPHOYJMS6RAX3EKLXYEC6QW X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 02/10] selftests:mptcp: enable v6 by default List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: We switch to -4 option now to disable v6 tests (v4 only). The goal is to have feedback from other CI watching netdev ML and others and launching kselftests for each new patch. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" tools/testing/selftests/net/mptcp/mptcp_connect.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index b51cea35e5c4..49b3fb6b042d 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -3,7 +3,7 @@ time_start=$(date +%s) -optstring="d:e:l:r:h6c" +optstring="d:e:l:r:h4c" ret=0 sin="" sout="" @@ -12,7 +12,7 @@ cout="" ksft_skip=4 capture=false timeout=30 -ipv6=false +ipv6=true ethtool_random_on=true tc_delay="$((RANDOM%400))" tc_loss=$((RANDOM%101)) @@ -34,7 +34,7 @@ usage() { echo -e "\t-l: tc/netem loss percentage, e.g. \"-l 0.02\" (default random)" echo -e "\t-r: tc/netem reorder mode, e.g. \"-r 25% 50% gap 5\", use "-r 0" to disable reordering (default random)" echo -e "\t-e: ethtool features to disable, e.g.: \"-e tso -e gso\" (default: randomly disable any of tso/gso/gro)" - echo -e "\t-6: enable IPv6 tests (default: only test IPv4)" + echo -e "\t-4: IPv4 only: disable IPv6 tests (default: test both IPv4 and IPv6)" echo -e "\t-c: capture packets for each test using tcpdump (default: no capture)" } @@ -62,8 +62,8 @@ while getopts "$optstring" option;do "r") tc_reorder="$OPTARG" ;; - "6") - ipv6=true + "4") + ipv6=false ;; "c") capture=true From patchwork Sat Nov 16 12:59:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196112 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="MjWF80XV"; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Fb0m3g2hz9sPW for ; Sun, 17 Nov 2019 00:00:07 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0E988100DC3EA; Sat, 16 Nov 2019 05:01:15 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 7D68B100DC3E2 for ; Sat, 16 Nov 2019 05:01:13 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id t26so13351194wmi.4 for ; Sat, 16 Nov 2019 04:59:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IRkoyOrpb3jyURecy6Lp0/f2y8oA35kgBLeHD6RnNVw=; b=MjWF80XVKpxbmngyTcwDxVaZvjCB1we/hFVKH16JuWBXU3Tt1eqHoueVCLQEkG6QpN cYVe7GxrEvCVL8BcKAa5ayWlCS0wm1szF4l7rMp+e0gvS5dEGxsDC5YW1ltmX3CRJfoV 8tfIdoPtVvtTRunahwb5uos+eKdOA0U7cpZT39nuweCWuNn+nBKiRy3IlLFFLN12RIGi lByFRjG5AhPbfDJr7w4abo1ZkQGZXYGXsP97JHNbF23C9C7BHJC5d0vXzwdvoX4MX432 ne5iH/NF3CCx3Ess2hP9Vc1iAE0z78eFSw7FQI8WLzkJhgGllwCN5oEkMNP05eKvg74f UdOQ== 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=IRkoyOrpb3jyURecy6Lp0/f2y8oA35kgBLeHD6RnNVw=; b=qUzlFUcGFMSo7zpMRh1lDjz8V1AUc7o141GFjQw8gMwuSJdo7MU15t8vsAhAPRhNUX t9Hl+otyVNFkXKRv0664Q8ww92UUG97NzZoCf6510S0rQ3Lo18FjEjTQaE/MpymU1K83 vIFbtGbXGnXcaEn6QdO72iJ9S1Hz9QIJBsLilpVcO7CXpRFhi26LmaArRXJGvikN7Ji0 qQ0xxnlITOT9TS87vvn5u9p2ZrTCo16dCdMmdQl0hl1U1+79qOrfbWlqnElVjP80oLb7 d6N+mIvBFCLWOlxHR5IAVADAgHXw0U49V8NlPLZtG7cgtT6Zc8dcSa61DrnvBjpmaV0H +JIQ== X-Gm-Message-State: APjAAAUhgjVkDK2h0kCzlcEFQtJxUCxEnLlLPyqkIR826WNSxdPq/VKx vUsHAZxiAEZdp0rrvcC9z9/haZ3gOhdmXQ== X-Google-Smtp-Source: APXvYqxs/0Ln3ImPI+W2Qy1idEp99Qvw0bwebewB5NRYjgIk6ZedcAaT/IeeVvzcx3BpzZvliDRXRg== X-Received: by 2002:a05:600c:2944:: with SMTP id n4mr20189760wmd.57.1573909196905; Sat, 16 Nov 2019 04:59:56 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.04.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 04:59:56 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:29 +0100 Message-Id: <20191116125936.3563275-4-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: NQI4HYVM5TM5GJUKEAG6IEOISOKNF6ST X-Message-ID-Hash: NQI4HYVM5TM5GJUKEAG6IEOISOKNF6ST X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 03/10] selftests:mptcp: align v4 and v6 results List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Now that v6 tests are enabled by default, it annoys me that the alignement is not OK :-) Also thanks to this new alignment, I found a strange issue that led to multiple tests and at the end a crash, see a separated email I sent. Now the IP:port messages look like that: (10.0.1.1:10000 ) (dead:beef:2::1:10029) But then the rest is aligned: # INFO: Using loss of 0.22% delay 150 ms reorder 94% 20% on ns3eth4 # ns1-5dcf183d-9ef7pp MPTCP -> ns1-5dcf183d-9ef7pp (10.0.1.1:10000 ) MPTCP (duration 128ms) [ OK ] # ns1-5dcf183d-9ef7pp MPTCP -> ns1-5dcf183d-9ef7pp (10.0.1.1:10001 ) TCP (duration 127ms) [ OK ] # ns1-5dcf183d-9ef7pp TCP -> ns1-5dcf183d-9ef7pp (10.0.1.1:10002 ) MPTCP (duration 110ms) [ OK ] # ns1-5dcf183d-9ef7pp MPTCP -> ns1-5dcf183d-9ef7pp (dead:beef:1::1:10003) MPTCP (duration 127ms) [ OK ] # ns1-5dcf183d-9ef7pp MPTCP -> ns1-5dcf183d-9ef7pp (dead:beef:1::1:10004) TCP (duration 113ms) [ OK ] # ns1-5dcf183d-9ef7pp TCP -> ns1-5dcf183d-9ef7pp (dead:beef:1::1:10005) MPTCP (duration 135ms) [ OK ] Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" tools/testing/selftests/net/mptcp/mptcp_connect.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 49b3fb6b042d..74d62a69b6e9 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -302,7 +302,8 @@ do_transfer() :> "$sout" :> "$capout" - printf "%-4s %-5s -> %-4s (%s:%d) %-5s\t" ${connector_ns} ${cl_proto} ${listener_ns} ${connect_addr} ${port} ${srv_proto} + addr_port=$(printf "%s:%d" ${connect_addr} ${port}) + printf "%-4s %-5s -> %-4s (%-20s) %-5s\t" ${connector_ns} ${cl_proto} ${listener_ns} ${addr_port} ${srv_proto} if $capture; then if [ -z $SUDO_USER ] ; then From patchwork Sat Nov 16 12:59:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196105 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="2ULpYHaQ"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 47Fb0f62Wtz9sPK for ; Sun, 17 Nov 2019 00:00:02 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 157B7100DC3E3; Sat, 16 Nov 2019 05:01:16 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::42b; helo=mail-wr1-x42b.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 53EC6100DC3E9 for ; Sat, 16 Nov 2019 05:01:14 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id b3so13882348wrs.13 for ; Sat, 16 Nov 2019 04:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gPP/pTKeoOUGhUnfMDtLI4Xyw/gJzkXYaqOwjsDj0R8=; b=2ULpYHaQRoK9071+4GCs8ZXm3sZ+dWQcfG4emAjutTUpotXUegsyk12SAhDx3mPe8+ UJZTa9BRu8IwxULQiLngPHOIT2FGHsjnppBB80cAUbffYnyg2lGrU+NUfp70xWC6hYAM K/5CdPSimN9CNB5iT9FBfzSqSoBQ0E7DZ4Hx3nC0LAyDzljzrZwDAwCupGxnitSOyD3V ZxLBcw/TZI5xx+ukbGuHvLYddla2sXEWG6yCciPA3xOxH2b+TuUgDfJ7XAk9eayWUGUO wNWAfOOQOdM/q9/g5oarix4o032o2RtlPVniqn1OTrEq8Pm8M6qbLrJy5hMOmwfIEZmX rDYg== 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=gPP/pTKeoOUGhUnfMDtLI4Xyw/gJzkXYaqOwjsDj0R8=; b=A6kOTlm1zSDua60lhzBi/Jt1yYk3mV2U0uSYmYQfMtZCLxJ8GjcWhztDndZmwqH+Yj 7/LO7pBZ1nTOaat0z5oWDccLpkCqkEH3ISXkqKPmknJ0ldzQA8AydHNrZWFTbbu0wvsL GGpjJ4+7ywOek9FUb/iiosltU9ks9lAT+Le+de0vU5Mw7+El2fqud01VYSXEMRe2tGsd Lybib/OoETlb8gBQlqOBJOyJ57FQwu0j5CDHFpL8TIGbSHXykjQM4hqlKoxrHOkokXrk eSTY0DllSdiKSlmKDWUdcHn0zLCFaH/Ujbj+FShaWVy+NHhmvDzSKB+6LYXf7o13GRlD F6Bw== X-Gm-Message-State: APjAAAVpb1WBpo6Taea1/S0GhbBkv8HLi4emeVkVyvgl495QJsmXSJ8f ncJ3jjGI//UtCi2VspIKe/N/v9XqX+N/Qw== X-Google-Smtp-Source: APXvYqzAkgmXFPYEY4gtLBwY6OEeAUp8vf2YsUCozVkhqiqAK5Z/XV8xgHLOKzMG4wm+EGYvMTFQmA== X-Received: by 2002:adf:f282:: with SMTP id k2mr6870476wro.387.1573909197612; Sat, 16 Nov 2019 04:59:57 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.04.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 04:59:57 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:30 +0100 Message-Id: <20191116125936.3563275-5-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: NBA36SQAY6OB6NEDQ6U73FBKSDMVGYAX X-Message-ID-Hash: NBA36SQAY6OB6NEDQ6U73FBKSDMVGYAX X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 04/10] selftests:mptcp: reduce wait time for the listen List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: I noticed that we were spending a lot of time waiting with the sleep command. Now we poll the socket status and we reduce the exec time by maybe ~30 seconds. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" .../selftests/net/mptcp/mptcp_connect.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 74d62a69b6e9..3274cc1fd145 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -286,6 +286,23 @@ do_ping() return 0 } +# $1: ns, $2: port +wait_local_port_listen() +{ + local listener_ns="${1}" + local port="${2}" + + local port_hex i + + port_hex="$(printf "%04X" "${port}")" + for i in $(seq 10); do + ip netns exec "${listener_ns}" cat /proc/net/tcp* | \ + awk "BEGIN {rc=1} {if (\$2 ~ /:${port_hex}\$/ && \$4 ~ /0A/) {rc=0; exit}} END {exit rc}" && + break + sleep 0.1 + done +} + do_transfer() { listener_ns="$1" @@ -323,7 +340,7 @@ do_transfer() ip netns exec ${listener_ns} ./mptcp_connect -t $timeout -l -p $port -s ${srv_proto} $local_addr < "$sin" > "$sout" & spid=$! - sleep 1 + wait_local_port_listen "${listener_ns}" "${port}" start=$(date +%s%3N) ip netns exec ${connector_ns} ./mptcp_connect -t $timeout -p $port -s ${cl_proto} $connect_addr < "$cin" > "$cout" & From patchwork Sat Nov 16 12:59:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196106 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="iZ+hNh1p"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 47Fb0g6Jrbz9sNH for ; Sun, 17 Nov 2019 00:00:03 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1E21B100DC3E7; Sat, 16 Nov 2019 05:01:17 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::433; helo=mail-wr1-x433.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 C4B9F100DC3E3 for ; Sat, 16 Nov 2019 05:01:14 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id a15so13890849wrf.9 for ; Sat, 16 Nov 2019 04:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wv8PbpeFalJL9J3kc+1owIvzhR2oyabCBac6BQOu8Cs=; b=iZ+hNh1pOClvrnT/bw53lCztUv/rwGvKiz99OHd/qTQP3A+z8j6PJwn/BQnRLpr9il AC+hx89xWvC+vYU226sNXLDaw5EloLxn7AGS5KagafO9dxVEwRwQCmtfDGJo/JcCv5p/ 9ojR/cGxBwWyTNIX1V/VpieNaqP4JU8TrYByllFn9M/U95V+cIXYS76ICopi319RmelL fPCn75G0VaJCkUARo7zaMl2Xr6DRk63GanjlZwMUGcy/IKS8BYnobMvwSdl01izmuB8z kSVI+GxpcsL+v1yOLJ2d7CDB3hc41I1VPID9ayNtTWDjBcF+KQVpAFdvGxn2WI0nGDHu SiRA== 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=wv8PbpeFalJL9J3kc+1owIvzhR2oyabCBac6BQOu8Cs=; b=pAgGDQifn3Pg/HHYEqq7i5uFr3rN/kS18I8PasckEgWMasf4db0x5/nmQcEImRrcKo irPmrmj8Zqbgkqw4IYcFswVkmjDLZPvgv0oLrqnhzpriK52tK2XCmA8G/hsdYo0bDRyB 6Ppf0R1Uxurq8guaftL97bg8HFuHolFw3YvDrNeb3UDqjU1NBpOlxktC3AC6GGtYfuik zcuQJYe8A6CrJQI1okYX3iyYAlrnN4moIZN1vYDtZCGOfeJIJzStQoq+7eolVHqFJJHr /gkW4xi5nzbMELCgT5uNEvQuf1x4RhhNax0H07JvFBiPSFtKeIQLbIMA4+JwLwTgXVpu J2Gg== X-Gm-Message-State: APjAAAWSS3g5P+k1yhiAH16BTYm2+ZhVqjH0U+ZcuKQjJTpI6If47uze fPJgZHFTwT6hklad7yvALaM+Kx/a9qHAPg== X-Google-Smtp-Source: APXvYqxkySZnInePZujfJURiJAjnb0U9hK80aQAeMKw5lInQN6LJIeRbz6SQO2wyEKtv/FnuZUV+YA== X-Received: by 2002:adf:fec5:: with SMTP id q5mr20953489wrs.293.1573909198220; Sat, 16 Nov 2019 04:59:58 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.04.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 04:59:57 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:31 +0100 Message-Id: <20191116125936.3563275-6-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: JD7VLNWKSCFYA3L2LOZJBQF3AXVU677U X-Message-ID-Hash: JD7VLNWKSCFYA3L2LOZJBQF3AXVU677U X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 05/10] selftests:mptcp: reduce time to wait for DAD List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: We can use 'ip addr' to know if everything is setup. In my test, DAD has already finished when checking the first time. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" .../testing/selftests/net/mptcp/mptcp_connect.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 3274cc1fd145..f413a7f3379c 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -461,9 +461,23 @@ check_mptcp_disabled check_mptcp_ulp_setsockopt +show_all_ipv6() +{ + local ns + for ns in "$ns1" "$ns2" "$ns3" "$ns4"; do + ip -net "${ns}" -6 addr show scope global + done +} + # Allow DAD to finish -$ipv6 && sleep 2 +if $ipv6; then + for dad in $(seq 20); do + show_all_ipv6 | grep -q -e tentative -e temporary || break + sleep 0.1 + done +fi +echo "INFO: validating network environment with pings" for sender in "$ns1" "$ns2" "$ns3" "$ns4";do do_ping "$ns1" $sender 10.0.1.1 if $ipv6;then From patchwork Sat Nov 16 12:59:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196110 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="wvfiMx8k"; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Fb0m2jqYz9sNH for ; Sun, 17 Nov 2019 00:00:07 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 26B28100DC3F0; Sat, 16 Nov 2019 05:01:17 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 5EDD9100DC3EC for ; Sat, 16 Nov 2019 05:01:15 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id z19so13363348wmk.3 for ; Sat, 16 Nov 2019 05:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9c8qGMrPGv6A0Vcvv9Dzk2NEMnt4cTP/WinsjYWHc9c=; b=wvfiMx8kEQM/wZdzHDvNezC92Op6tCgDpNHQugrib8VbCiRDLB9BGPmGh5vS3pk/r+ fDwoPOSUULas81NG1Jkv5/jAoPu8PSJ1JtChDuuIaxhaf6Kj0s0l64KuBzzvGXRlwWSX qbFqw9TuY+ohevArCjQQsU68GFiEvvSMPekjg+Vf6qelfe2Elo2iCcwonIv3PdB/wxl+ pUUnETPmI7rKSPBYbOGx/FSH3/qeyUjoKEOQM2eSbbDtcY661Ms9UsBu6u0fPsXZr17z xL8SYgafkuc4T/q05lPbzRNztZHyV1UCnDhUtLFdAs33cr6CSsQVVlSM5CaaEdM7kcF1 u+zQ== 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=9c8qGMrPGv6A0Vcvv9Dzk2NEMnt4cTP/WinsjYWHc9c=; b=kviwp0AUxwjOmSll1prARLhBQ0HXnJxS9by8oGy2ecDkPFPjDI3SPeIKvYEhY4bSVs JbW5l8Yy23whB27eye6BsE7DS67jZpzcJcePWB+BGdnSOwZ/jd+oc9/KtDQK0cqqF7m8 QJcHQ2/aZW9aMIYRYaPbI1iE1g+bzJ/6eFbTkDiyCrb1Yv50C9y//Sq3o4lVe/+BgHYs 8GMbszhtSeEjYzahYkpx8aAC4k+XpfE78XhXPcsue+8Bps0hKZWspB43I9jOYv8Pwc0e 2U+gZV/ioSItKm/LiC8JOZwMPL1FiOd1BPAunfsTfClwTTS4QVHiJkNDqPA7z6lnafAH Ky/Q== X-Gm-Message-State: APjAAAVzIhzLMhMuIojWVP3hk35nYQUeokLYmGoVovlPjlf0+Y4JT2PQ XQcHPpqgUGL5i2LW1U74HDjr/dBj9+CwOw== X-Google-Smtp-Source: APXvYqyTCVQnqvkoNRLvLp89GdJB9le/p3Y9TwuwXi6FdmaZ0dBTGqOTDJV/FVInr/P6JE4ig8EFlQ== X-Received: by 2002:a1c:9d07:: with SMTP id g7mr20195618wme.53.1573909198895; Sat, 16 Nov 2019 04:59:58 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.04.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 04:59:58 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:32 +0100 Message-Id: <20191116125936.3563275-7-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: 4J6JDXRLZKZU7M4YKFC5IY5C3E2LTDGP X-Message-ID-Hash: 4J6JDXRLZKZU7M4YKFC5IY5C3E2LTDGP X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 06/10] selftests:mptcp: only display the NS id List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: instead of displaying: ns4-5dcfada6-91cmhp MPTCP -> ns3-5dcfada6-91cmhp (...) we only keep: ns4 MPTCP -> ns3 (...) Note that the full name is displayed before in the INFO messages. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index f413a7f3379c..8f5844c2f4cd 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -320,7 +320,7 @@ do_transfer() :> "$capout" addr_port=$(printf "%s:%d" ${connect_addr} ${port}) - printf "%-4s %-5s -> %-4s (%-20s) %-5s\t" ${connector_ns} ${cl_proto} ${listener_ns} ${addr_port} ${srv_proto} + printf "%.3s %-5s -> %.3s (%-20s) %-5s\t" ${connector_ns} ${cl_proto} ${listener_ns} ${addr_port} ${srv_proto} if $capture; then if [ -z $SUDO_USER ] ; then From patchwork Sat Nov 16 12:59:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196108 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="nXeIwlYt"; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Fb0m35h2z9sP6 for ; Sun, 17 Nov 2019 00:00:07 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2DCCB100DC3F1; Sat, 16 Nov 2019 05:01:18 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 A8CE1100DC3DB for ; Sat, 16 Nov 2019 05:01:16 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id s5so13927970wrw.2 for ; Sat, 16 Nov 2019 05:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/whq4+JPWvlk8Wa64NI+oSyjo51iDQZMlnnjXbYoAiE=; b=nXeIwlYtwXXrLQ7BPapzWDG1JfaOY61zh94/NqjQRq/i9CVCJMtsQlrqXc+DknnyKZ tDBKTkEGLf90/L+0Zr47ZwA44flUUcX3YAom2Dk4lde+xVMyyvys3qs1jI4n8bVbNuEs FndsKV8CjrOMeKAlJFo7x+Oh2bLG6DqU9Q19bGVeCQsR9/MtgWOS1eSGmSbEceXbN4+B X9FxA95KxgmT3g6LEirGXaUKLPfsmwPVKXUgRSm7CJRpQ3NHB5+NXDflO0/3Qf3vglJ4 YmdtEBA+DfDLFF56aJo1euykzwJDRefS300KydacZPDT6QE0xsTkokdjnJ0gkG9mPcXD xBEw== 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=/whq4+JPWvlk8Wa64NI+oSyjo51iDQZMlnnjXbYoAiE=; b=PDbCr/VkWENmDxyxhoNrvqcWD/2rXRRJmsIWf6AExCzVRhmCA4TCLehZl68Tz6m7VX 949Mr/qk4lapPt02L46FK+nicgSFYlUVJvtgAVo6GXMiGG5Q4IfaYZNvLMwbrVKQo97x PdhNr9xhv1mql18+AA9Z5+BD4oLAX21KLuN6t0NCeBgbzQbU2TNrxSTCHd/PKEm1iMD+ jz/6JH+Um2ValWqhygZzXXbM4ceeAVzDuGmJ8ZVdwq6EAacLg2V1dNAkn+/72jhrKz4n x5zXvTI+y0WBhnl6ezHynDJUZG4NLHxGrzeOcWs3xwthwqqZpRFcGrrB+dp0eCUTooak RGug== X-Gm-Message-State: APjAAAXsBmzOi8m1prUoTr55sxmt4BNgMkf8ERZGjOHSVYJ1tnCVVVoy eJ2sFXJFcLwBwFkeMc4cjwN+hLmu7THuqg== X-Google-Smtp-Source: APXvYqwLoXMI1s3elGV0h/yOOuhByyHJ2bct6UOOj6RF+vk5sRt4hEdGutCU9/ChoOrqcZYSv63vRg== X-Received: by 2002:adf:81e5:: with SMTP id 92mr20221708wra.41.1573909200032; Sat, 16 Nov 2019 05:00:00 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.04.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 04:59:59 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:33 +0100 Message-Id: <20191116125936.3563275-8-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: 34CYMTIG5JVS7N57TVUL5CYRWB75P4K3 X-Message-ID-Hash: 34CYMTIG5JVS7N57TVUL5CYRWB75P4K3 X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 07/10] selftests:mptcp: avoid global var clash List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: With bash, variables are global by default. Some functions were declaring local variables, some not. Unified this to avoid anoying problems in the future. Also fix indentation around the capture feature. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" .../selftests/net/mptcp/mptcp_connect.sh | 90 ++++++++++--------- 1 file changed, 50 insertions(+), 40 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 8f5844c2f4cd..a8c55005cc0c 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -90,6 +90,7 @@ cleanup() rm -f "$sin" "$sout" rm -f "$capout" + local netns for netns in "$ns1" "$ns2" "$ns3" "$ns4";do ip netns del $netns done @@ -178,9 +179,9 @@ set_random_ethtool_flags() { local flags="" local r=$RANDOM - pick1=$((r & 1)) - pick2=$((r & 2)) - pick3=$((r & 4)) + local pick1=$((r & 1)) + local pick2=$((r & 2)) + local pick3=$((r & 4)) [ $pick1 -ne 0 ] && flags="tso off" [ $pick2 -ne 0 ] && flags="$flags gso off" @@ -208,9 +209,9 @@ print_file_err() check_transfer() { - in=$1 - out=$2 - what=$3 + local in=$1 + local out=$2 + local what=$3 cmp "$in" "$out" > /dev/null 2>&1 if [ $? -ne 0 ] ;then @@ -226,6 +227,7 @@ check_transfer() check_mptcp_disabled() { + local disabled_ns disabled_ns="ns_disabled-$sech-$(mktemp -u XXXXXX)" ip netns add ${disabled_ns} || exit $ksft_skip @@ -254,7 +256,8 @@ check_mptcp_disabled() check_mptcp_ulp_setsockopt() { - local t="ns_ulp-$sech-$(mktemp -u XXXXXX)" retval= + local t retval + t="ns_ulp-$sech-$(mktemp -u XXXXXX)" ip netns add ${t} || exit $ksft_skip if ! ip netns exec ${t} ./mptcp_connect -u -p 10000 -s TCP 127.0.0.1 2>&1; then @@ -271,9 +274,9 @@ check_mptcp_ulp_setsockopt() do_ping() { - listener_ns="$1" - connector_ns="$2" - connect_addr="$3" + local listener_ns="$1" + local connector_ns="$2" + local connect_addr="$3" ip netns exec ${connector_ns} ping -q -c 1 $connect_addr >/dev/null if [ $? -ne 0 ] ; then @@ -305,13 +308,14 @@ wait_local_port_listen() do_transfer() { - listener_ns="$1" - connector_ns="$2" - cl_proto="$3" - srv_proto="$4" - connect_addr="$5" - local_addr="$6" - + local listener_ns="$1" + local connector_ns="$2" + local cl_proto="$3" + local srv_proto="$4" + local connect_addr="$5" + local local_addr="$6" + + local port port=$((10000+$TEST_COUNT)) TEST_COUNT=$((TEST_COUNT+1)) @@ -319,45 +323,50 @@ do_transfer() :> "$sout" :> "$capout" + local addr_port addr_port=$(printf "%s:%d" ${connect_addr} ${port}) printf "%.3s %-5s -> %.3s (%-20s) %-5s\t" ${connector_ns} ${cl_proto} ${listener_ns} ${addr_port} ${srv_proto} if $capture; then - if [ -z $SUDO_USER ] ; then - capuser="" - else - capuser="-Z $SUDO_USER" - fi + local capuser + if [ -z $SUDO_USER ] ; then + capuser="" + else + capuser="-Z $SUDO_USER" + fi - capfile="${listener_ns}-${connector_ns}-${cl_proto}-${srv_proto}-${connect_addr}.pcap" + local capfile="${listener_ns}-${connector_ns}-${cl_proto}-${srv_proto}-${connect_addr}.pcap" - ip netns exec ${listener_ns} tcpdump -i any -s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 & - cappid=$! + ip netns exec ${listener_ns} tcpdump -i any -s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 & + local cappid=$! - sleep 1 + sleep 1 fi ip netns exec ${listener_ns} ./mptcp_connect -t $timeout -l -p $port -s ${srv_proto} $local_addr < "$sin" > "$sout" & - spid=$! + local spid=$! wait_local_port_listen "${listener_ns}" "${port}" + local start start=$(date +%s%3N) ip netns exec ${connector_ns} ./mptcp_connect -t $timeout -p $port -s ${cl_proto} $connect_addr < "$cin" > "$cout" & - cpid=$! + local cpid=$! wait $cpid - retc=$? + local retc=$? wait $spid - rets=$? + local rets=$? + local stop stop=$(date +%s%3N) if $capture; then - sleep 1 - kill $cappid + sleep 1 + kill $cappid fi + local duration duration=$((stop-start)) duration=$(printf "(duration %05sms)" $duration) if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then @@ -388,9 +397,10 @@ do_transfer() make_file() { - name=$1 - who=$2 + local name=$1 + local who=$2 + local SIZE TSIZE SIZE=$((RANDOM % (1024 * 8))) TSIZE=$((SIZE * 1024)) @@ -407,12 +417,12 @@ make_file() run_tests_lo() { - listener_ns="$1" - connector_ns="$2" - connect_addr="$3" - local_addr="$4" - loopback="$5" - lret=0 + local listener_ns="$1" + local connector_ns="$2" + local connect_addr="$3" + local local_addr="$4" + local loopback="$5" + local lret=0 # skip if test programs are running inside same netns for subsequent runs. if [ $loopback -eq 0 ] && [ ${listener_ns} = ${connector_ns} ]; then From patchwork Sat Nov 16 12:59:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196107 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="RRGfxneQ"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 47Fb0k0Dmmz9sNH for ; Sun, 17 Nov 2019 00:00:05 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 429BB100DC3F4; Sat, 16 Nov 2019 05:01:19 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::42e; helo=mail-wr1-x42e.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 50866100DC3F2 for ; Sat, 16 Nov 2019 05:01:17 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id w9so13938209wrr.0 for ; Sat, 16 Nov 2019 05:00:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gA15bZbfYzDH0/fq6TBbRvDqXnzqRMora+IjTZSbo8M=; b=RRGfxneQYol+kOa0hKt3ycwpX9sZePQWbF8DoQO7ASw2JBn02kcfAWqeQtVCbNR8cM CwkXgKUtElwuz6MKEj6kTR6KFD9O6yB8YV4kzXbtB+Vv9XscLszy97oraKjHTp1uWxKk GYSjyK2Hj72EpGQixYKCsXFG/F9pOB9kT14HwRnBPyiglBKjoQ1aLL0B+XMQpc1dgd00 F1Pw809em/waoa9g8wObWkx/imgj5qksC7llKycnicW8NSrFU8osZV81m2i56bmxFehH I80CSbqFdcuz7OzrnmbM0Q45GtT2u1mOcrKVl24JYCiDbTgFYscbepFVBkNWLv2Ql1P2 aHPw== 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=gA15bZbfYzDH0/fq6TBbRvDqXnzqRMora+IjTZSbo8M=; b=RLM4R/Wq69kano4/SkBmaqJOTHfNB1yf2vrCoyWN1nw3CS+xWRgXxmeYxpL93EkZhv +FbRCMd24RQ+9YWF+mDpkJSFQTvD67wT+MYf7mfNQxdQi2Pl+PauIjBmXEmiRVyUVEZt iviYQIgSqizcSbarFT2Nq3w0I4Xz+g8T/lrakUGXqY/h0Sx0YCK9TU/6D9KCqfYodudj m7H5cWjVtxPajmpCUB8oKI+SeAQdc1i+LrB9stuqNHGsHb4ajQ8Vw43zdW1nczAosf14 IQNI6RUo+kGqz2QkCj6UgjJ7Cl3HLVA3uqElWjfaQKfGJ4ko+x/O4dsCDftntzREm54a VeFQ== X-Gm-Message-State: APjAAAUINIUddPoacMQ3pCtv3g81KOe1oG9+NwyeyuT7/lLtwz0O4S+/ zoONP1teHRjAmkXHz3/RHVLbi1jHbyKuqg== X-Google-Smtp-Source: APXvYqzgzKOEQn7yDBpLT8YtIbUB/O8RhzmY6j5LCiZ6RWRBQYVt9EtKC3/uqtxHsP9k/Cl3p9Do+w== X-Received: by 2002:adf:e506:: with SMTP id j6mr21210144wrm.19.1573909200706; Sat, 16 Nov 2019 05:00:00 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.05.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 05:00:00 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:34 +0100 Message-Id: <20191116125936.3563275-9-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: WRMZVK7HDSIW7YHISNCGMSCIEZIYH5V6 X-Message-ID-Hash: WRMZVK7HDSIW7YHISNCGMSCIEZIYH5V6 X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 08/10] selftests:mptcp: do not reset "ret" when skipping List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: In the loop, we will have the two ns having the same name, that's normal. No need to return and error and reset ret to 0 (lret not modified, init to 0). Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" tools/testing/selftests/net/mptcp/mptcp_connect.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index a8c55005cc0c..1e2a24946e36 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -426,8 +426,7 @@ run_tests_lo() # skip if test programs are running inside same netns for subsequent runs. if [ $loopback -eq 0 ] && [ ${listener_ns} = ${connector_ns} ]; then - ret=$lret - return 1 + return 0 fi do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} ${local_addr} From patchwork Sat Nov 16 12:59:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196111 X-Patchwork-Delegate: matthieu.baerts@tessares.net 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=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="J8sUzLXY"; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Fb0m3cRrz9sPL for ; Sun, 17 Nov 2019 00:00:07 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4A902100DC3E7; Sat, 16 Nov 2019 05:01:20 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::434; helo=mail-wr1-x434.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 998A5100DC3E3 for ; Sat, 16 Nov 2019 05:01:18 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id e6so13929395wrw.1 for ; Sat, 16 Nov 2019 05:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CZjtmqorLbo1d3SA1n+HcvfIQ4rwfZH1sm0vXhHwyxg=; b=J8sUzLXY62NSRQboTnIssdlUEI+FSoVB70q2Bv9U5jz2WDaEXN06Ahx0nVMC9Yfj8Q CvfdNA70XD/3pYOnE2KHCycyu0mTiwtu4hoOHyc+BZwWXA8ByKNfKlGMd96KleIzZwb2 CTBNe1qLlewFH/r1PsCApE4W9aM2jmVhMu2lkDogtWQrhu72mmtHS+MGrhlWPI+UCyUT rjum4ljAoXoyb4umzzTeIKZt453IffwyAISg00lNWz8tHxIqlqRgwVlx8LmMYYRWQZdh sDCQb0WlCUPYtB8WRTc48VQRhKmYcToBQWe7Ft7CMdVMngji7xCC0Vt3rJZGjSNFk6bM 9JMA== 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=CZjtmqorLbo1d3SA1n+HcvfIQ4rwfZH1sm0vXhHwyxg=; b=pgusqbm+J3pPDhy4UkARd6HjyI1gGxb0I8bEOFcB1iA15DhuIAqJ3MBLdwrPOVOIy5 ZqGGzNzpjzcOT+04TzlZ0AQgZVCde1xZ0BzE1es0DRb7iOJHkrJJx6XVvyap0ieLo0MY r8qg4lF7pcr4XqoRyn1RbH4c2L0mBois7ArjvC+CONtq/BkaFy8dXof3818rOP5o2p+T 2ggYzJQxSsAkNuwcer6Vdpakvnu5n0H7parnf0DN49GwYu3aYa98DqJEnLRJIYR8r98I tdWvG2SLDX/TdraB2VqJHHw945odVzXOQejNOH63/jUSGezMHUn6hXXvZF1C1v66sqG9 wZgg== X-Gm-Message-State: APjAAAWfSp4eogcvsCxQYId2++PMtnr/BjHWsneSvogk6hgl57IuvAfs ghP+m+ZKxaroPBxBqiPza4/4Di6pkOXK+w== X-Google-Smtp-Source: APXvYqziDNpoA+d7bj+YZCcSKK1PCEnZbK5bw3o2zpb8OnYCvIj/Y64ozrm1Fs0+d33GS8fJvqpTZQ== X-Received: by 2002:a5d:6746:: with SMTP id l6mr10401116wrw.349.1573909201378; Sat, 16 Nov 2019 05:00:01 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.05.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 05:00:00 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:35 +0100 Message-Id: <20191116125936.3563275-10-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: 4TBSWAXLQJ3EKYRCZAUEYK22NKLYVIOO X-Message-ID-Hash: 4TBSWAXLQJ3EKYRCZAUEYK22NKLYVIOO X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 09/10] selftests:mptcp: force MPTCP_IPV6 config List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: We want our stack to be tested with v6, better to force the kconfig accordingly then. Also if we are sure we have IPv6 support, we can simplify the script to always setup the IPv6 config but not launch IPv6 tests. We can then now have result in ~15/20 seconds with the "-4" option. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" tools/testing/selftests/net/mptcp/config | 1 + .../selftests/net/mptcp/mptcp_connect.sh | 118 +++++++++--------- 2 files changed, 62 insertions(+), 57 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/config b/tools/testing/selftests/net/mptcp/config index 3bfe60494af8..463f0514577d 100644 --- a/tools/testing/selftests/net/mptcp/config +++ b/tools/testing/selftests/net/mptcp/config @@ -1 +1,2 @@ CONFIG_MPTCP=y +CONFIG_MPTCP_IPV6=y diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 1e2a24946e36..a03760d12eff 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -124,47 +124,41 @@ ip link add ns2eth3 netns "$ns2" type veth peer name ns3eth2 netns "$ns3" ip link add ns3eth4 netns "$ns3" type veth peer name ns4eth3 netns "$ns4" ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2 -if $ipv6 ; then - ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 - if [ $? -ne 0 ] ;then - echo "SKIP: Can't add ipv6 address, skip ipv6 tests" 1>&2 - ipv6=false - fi -fi +ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 ip -net "$ns1" link set ns1eth2 up ip -net "$ns1" route add default via 10.0.1.2 -$ipv6 && ip -net "$ns1" route add default via dead:beef:1::2 +ip -net "$ns1" route add default via dead:beef:1::2 ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1 -$ipv6 && ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 +ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 ip -net "$ns2" link set ns2eth1 up ip -net "$ns2" addr add 10.0.2.1/24 dev ns2eth3 -$ipv6 && ip -net "$ns2" addr add dead:beef:2::1/64 dev ns2eth3 +ip -net "$ns2" addr add dead:beef:2::1/64 dev ns2eth3 ip -net "$ns2" link set ns2eth3 up ip -net "$ns2" route add default via 10.0.2.2 -$ipv6 && ip -net "$ns2" route add default via dead:beef:2::2 +ip -net "$ns2" route add default via dead:beef:2::2 ip netns exec "$ns2" sysctl -q net.ipv4.ip_forward=1 -$ipv6 && ip netns exec "$ns2" sysctl -q net.ipv6.conf.all.forwarding=1 +ip netns exec "$ns2" sysctl -q net.ipv6.conf.all.forwarding=1 ip -net "$ns3" addr add 10.0.2.2/24 dev ns3eth2 -$ipv6 && ip -net "$ns3" addr add dead:beef:2::2/64 dev ns3eth2 +ip -net "$ns3" addr add dead:beef:2::2/64 dev ns3eth2 ip -net "$ns3" link set ns3eth2 up ip -net "$ns3" addr add 10.0.3.2/24 dev ns3eth4 -$ipv6 && ip -net "$ns3" addr add dead:beef:3::2/64 dev ns3eth4 +ip -net "$ns3" addr add dead:beef:3::2/64 dev ns3eth4 ip -net "$ns3" link set ns3eth4 up ip -net "$ns3" route add default via 10.0.2.1 -$ipv6 && ip -net "$ns3" route add default via dead:beef:2::1 +ip -net "$ns3" route add default via dead:beef:2::1 ip netns exec "$ns3" sysctl -q net.ipv4.ip_forward=1 -$ipv6 && ip netns exec "$ns3" sysctl -q net.ipv6.conf.all.forwarding=1 +ip netns exec "$ns3" sysctl -q net.ipv6.conf.all.forwarding=1 ip -net "$ns4" addr add 10.0.3.1/24 dev ns4eth3 -$ipv6 && ip -net "$ns4" addr add dead:beef:3::1/64 dev ns4eth3 +ip -net "$ns4" addr add dead:beef:3::1/64 dev ns4eth3 ip -net "$ns4" link set ns4eth3 up ip -net "$ns4" route add default via 10.0.3.2 -$ipv6 && ip -net "$ns4" route add default via dead:beef:3::2 +ip -net "$ns4" route add default via dead:beef:3::2 set_ethtool_flags() { local ns="$1" @@ -272,12 +266,22 @@ check_mptcp_ulp_setsockopt() return $retval } +# $1: IP address +is_v6() +{ + [ -z "${1##*:*}" ] +} + do_ping() { local listener_ns="$1" local connector_ns="$2" local connect_addr="$3" + if ! $ipv6 && is_v6 "${connect_addr}"; then + return 0 + fi + ip netns exec ${connector_ns} ping -q -c 1 $connect_addr >/dev/null if [ $? -ne 0 ] ; then echo "$listener_ns -> $connect_addr connectivity [ FAIL ]" 1>&2 @@ -420,8 +424,7 @@ run_tests_lo() local listener_ns="$1" local connector_ns="$2" local connect_addr="$3" - local local_addr="$4" - local loopback="$5" + local loopback="$4" local lret=0 # skip if test programs are running inside same netns for subsequent runs. @@ -429,6 +432,18 @@ run_tests_lo() return 0 fi + # skip if we don't want v6 + if ! $ipv6 && is_v6 "${connect_addr}"; then + return 0 + fi + + local local_addr + if is_v6 "${connect_addr}"; then + local_addr="::" + else + local_addr="0.0.0.0" + fi + do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} ${local_addr} lret=$? if [ $lret -ne 0 ]; then @@ -460,7 +475,7 @@ run_tests_lo() run_tests() { - run_tests_lo $1 $2 $3 $4 0 + run_tests_lo $1 $2 $3 0 } make_file "$cin" "client" @@ -479,36 +494,28 @@ show_all_ipv6() } # Allow DAD to finish -if $ipv6; then - for dad in $(seq 20); do - show_all_ipv6 | grep -q -e tentative -e temporary || break - sleep 0.1 - done -fi +for dad in $(seq 20); do + show_all_ipv6 | grep -q -e tentative -e temporary || break + sleep 0.1 +done echo "INFO: validating network environment with pings" for sender in "$ns1" "$ns2" "$ns3" "$ns4";do do_ping "$ns1" $sender 10.0.1.1 - if $ipv6;then - do_ping "$ns1" $sender dead:beef:1::1 - if [ $? -ne 0 ]; then - echo "SKIP: IPv6 tests" 2>&1 - ipv6=false - fi - fi + do_ping "$ns1" $sender dead:beef:1::1 do_ping "$ns2" $sender 10.0.1.2 - $ipv6 && do_ping "$ns2" $sender dead:beef:1::2 + do_ping "$ns2" $sender dead:beef:1::2 do_ping "$ns2" $sender 10.0.2.1 - $ipv6 && do_ping "$ns2" $sender dead:beef:2::1 + do_ping "$ns2" $sender dead:beef:2::1 do_ping "$ns3" $sender 10.0.2.2 - $ipv6 && do_ping "$ns3" $sender dead:beef:2::2 + do_ping "$ns3" $sender dead:beef:2::2 do_ping "$ns3" $sender 10.0.3.2 - $ipv6 && do_ping "$ns3" $sender dead:beef:3::2 + do_ping "$ns3" $sender dead:beef:3::2 do_ping "$ns4" $sender 10.0.3.1 - $ipv6 && do_ping "$ns4" $sender dead:beef:3::1 + do_ping "$ns4" $sender dead:beef:3::1 done [ -n "$tc_loss" ] && tc -net "$ns2" qdisc add dev ns2eth3 root netem loss random $tc_loss @@ -537,32 +544,29 @@ echo "on ns3eth4" tc -net "$ns3" qdisc add dev ns3eth4 root netem delay ${tc_delay}ms $tc_reorder for sender in $ns1 $ns2 $ns3 $ns4;do - run_tests_lo "$ns1" "$sender" 10.0.1.1 0.0.0.0 1 + run_tests_lo "$ns1" "$sender" 10.0.1.1 1 if [ $ret -ne 0 ] ;then echo "FAIL: Could not even run loopback test" 1>&2 exit $ret fi - if $ipv6;then - run_tests_lo "$ns1" $sender dead:beef:1::1 :: 1 - if [ $? -ne 0 ] ;then - echo "SKIP: IPv6 tests" 2>&1 - ret=0 - ipv6=false - fi + run_tests_lo "$ns1" $sender dead:beef:1::1 1 + if [ $ret -ne 0 ] ;then + echo "FAIL: Could not even run loopback v6 test" 2>&1 + exit $ret fi - run_tests "$ns2" $sender 10.0.1.2 0.0.0.0 - $ipv6 && run_tests "$ns2" $sender dead:beef:1::2 :: - run_tests "$ns2" $sender 10.0.2.1 0.0.0.0 - $ipv6 && run_tests "$ns2" $sender dead:beef:2::1 :: + run_tests "$ns2" $sender 10.0.1.2 + run_tests "$ns2" $sender dead:beef:1::2 + run_tests "$ns2" $sender 10.0.2.1 + run_tests "$ns2" $sender dead:beef:2::1 - run_tests "$ns3" $sender 10.0.2.2 0.0.0.0 - $ipv6 && run_tests "$ns3" $sender dead:beef:2::2 :: - run_tests "$ns3" $sender 10.0.3.2 0.0.0.0 - $ipv6 && run_tests "$ns3" $sender dead:beef:3::2 :: + run_tests "$ns3" $sender 10.0.2.2 + run_tests "$ns3" $sender dead:beef:2::2 + run_tests "$ns3" $sender 10.0.3.2 + run_tests "$ns3" $sender dead:beef:3::2 - run_tests "$ns4" $sender 10.0.3.1 0.0.0.0 - $ipv6 && run_tests "$ns4" $sender dead:beef:3::1 :: + run_tests "$ns4" $sender 10.0.3.1 + run_tests "$ns4" $sender dead:beef:3::1 done time_end=$(date +%s) From patchwork Sat Nov 16 12:59:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1196109 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=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="uQPZ5vNF"; 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 47Fb0m3KR8z9sPK for ; Sun, 17 Nov 2019 00:00:08 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 52082100DC3F5; Sat, 16 Nov 2019 05:01:21 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::342; helo=mail-wm1-x342.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 AF757100DC3F2 for ; Sat, 16 Nov 2019 05:01:18 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id j18so12117828wmk.1 for ; Sat, 16 Nov 2019 05:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V2D6Eoob3tKf9DmVtAuZ4hJLHx0r933G+VbBQVE6ciE=; b=uQPZ5vNFNDM+agZqVG5B/JrXbfupLNLyZccXxOrPl+jv68K2tGVqo4llGwOwjKpcAE 3IphV0X+RPqwhciK3HGTRxM14Z8M17icMJYaq/W8iRL4NiEAbM2rfl7pjo3MsVnObmLe qkXMHMM29sonz/AbJm8WNk/SyACdoHkkaW3Ln2LkrA5v8TJgEMU5L5K+ojdmsu98DyiW C8Ivph2SALyHdlbTX3u3z0wdZ73bUo03xR8TJN3bTuhVPJB3exNHYUGqgmXVEtKtSoG4 i5UvjhRi31UNCXqro7zHdK+WPf9C3u9QKG9hbEYljbEzz8nrwZ3FmU7qMRQLVKjaZ4YV 54LQ== 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=V2D6Eoob3tKf9DmVtAuZ4hJLHx0r933G+VbBQVE6ciE=; b=Q4r2Dul7/l0Mgp42hnd3P9nTpe82VWqW6nPSzu6ltdUdG+QxIql50kXoAeHEpeLyfe JFLfGX5LCe9NzOyqDxCYSVtZ0i/sF8LNv+TlmNJtiZCwMPthgugfJTJ6PKFk6A+lsuvQ eBrpTBMILXpJsxRhA7rV+tiNAp68HHjx827wUsa7qlneRH2+ebWTHULt3x5/iY48A/fm fgiERok7df15mIVHQcFvT1SNHS0OqAu0XvLhZpKYd1vE3s3rR8WXhtfaBRHA94V68jxv oMnZVRA2GhzvkM04TRSDphFLI7qVgyS9HL+CNrfhN1qCUYBmu6sem56ZSTbhuPtM5qGH yemA== X-Gm-Message-State: APjAAAU7LmOsOm9jD3KBCXkxzkJFd0+BL5ou6E+gY+IvHquv3W0KECl0 TusdrkDYM6dSgap4gYh4/p2FWHeBgpPYSQ== X-Google-Smtp-Source: APXvYqy+vj3+NE0zbYCZT+bhyKKyVL8WpeOHamJ89SVPrG9UYHghI+SiSnwp/Z89Xc4XsyU5l5QE3w== X-Received: by 2002:a1c:4606:: with SMTP id t6mr19256867wma.73.1573909202170; Sat, 16 Nov 2019 05:00:02 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id r15sm18381834wrc.5.2019.11.16.05.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 05:00:01 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Sat, 16 Nov 2019 13:59:36 +0100 Message-Id: <20191116125936.3563275-11-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116125936.3563275-1-matthieu.baerts@tessares.net> References: <20191116125936.3563275-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Message-ID-Hash: MGIT6ZSTV3FI3HZHYGQEYNA3CUMQDBPU X-Message-ID-Hash: MGIT6ZSTV3FI3HZHYGQEYNA3CUMQDBPU X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH 10/10] [RFC] selftests:mptcp: decrease timeout to 100 sec List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: In my tests, I first tried to use the worst random case we can have: 1% of loss, 399ms of delay and a max of re-order but I guess it really depends on what is lost and re-ordered. Most of my results are around 30 seconds on my machine But mostly when there is no re-ordering, the test can be very long! This can happen in the normal mode, when not specifying any parameter to the script: ns1 MPTCP -> ns3 (dead:beef:3::2:10013) MPTCP (duration 157ms) [ OK ] ns1 MPTCP -> ns4 (10.0.3.1:10014 ) MPTCP (duration 33023ms) [ OK ] ns1 MPTCP -> ns4 (dead:beef:3::1:10015) MPTCP (duration 36485ms) [ OK ] ns2 MPTCP -> ns1 (10.0.1.1:10016 ) MPTCP (duration 118ms) [ OK ] (...) ns2 MPTCP -> ns3 (dead:beef:3::2:10021) MPTCP (duration 126ms) [ OK ] ns2 MPTCP -> ns4 (10.0.3.1:10022 ) MPTCP (duration 15036ms) [ OK ] ns2 MPTCP -> ns4 (dead:beef:3::1:10023) MPTCP (duration 11507ms) [ OK ] ns3 MPTCP -> ns1 (10.0.1.1:10024 ) MPTCP (duration 129ms) [ OK ] (...) ns3 MPTCP -> ns2 (dead:beef:2::1:10029) MPTCP (duration 139ms) [ OK ] ns3 MPTCP -> ns4 (10.0.3.1:10030 ) MPTCP (duration 4317ms) [ OK ] ns3 MPTCP -> ns4 (dead:beef:3::1:10031) MPTCP (duration 4321ms) [ OK ] ns4 MPTCP -> ns1 (10.0.1.1:10032 ) MPTCP (duration 48538ms) [ OK ] ns4 MPTCP -> ns1 (dead:beef:1::1:10033) MPTCP (duration 39943ms) [ OK ] ns4 MPTCP -> ns2 (10.0.1.2:10034 ) MPTCP (duration 24599ms) [ OK ] ns4 MPTCP -> ns2 (dead:beef:1::2:10035) MPTCP (duration 23126ms) [ OK ] ns4 MPTCP -> ns2 (10.0.2.1:10036 ) MPTCP (duration 64512ms) [ OK ] ns4 MPTCP -> ns2 (dead:beef:2::1:10037) MPTCP (duration 37747ms) [ OK ] ns4 MPTCP -> ns3 (10.0.2.2:10038 ) MPTCP (duration 4766ms) [ OK ] ns4 MPTCP -> ns3 (dead:beef:2::2:10039) MPTCP (duration 4772ms) [ OK ] ns4 MPTCP -> ns3 (10.0.3.2:10040 ) MPTCP (duration 4699ms) [ OK ] ns4 MPTCP -> ns3 (dead:beef:3::2:10041) MPTCP (duration 4324ms) [ OK ] Time: 425 seconds I can reproduce this when there is no re-ordering: ./mptcp_connect.sh -r 0 I guess there is a bug and we should not take this into account to find the best timeout but while this is not fixed, I don't know if we can apply this patch. Most of the time, the tests take ~30 seconds. When the conditions make the test slower, if I remove the very long tests (no re-ordering), the tests take max 50 seconds. That's why I double this last value for the new default timeout. This could be doubled again if needed because I didn't use a very slow machine. Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" tools/testing/selftests/net/mptcp/settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/settings b/tools/testing/selftests/net/mptcp/settings index 026384c189c9..a953c96aa16e 100644 --- a/tools/testing/selftests/net/mptcp/settings +++ b/tools/testing/selftests/net/mptcp/settings @@ -1 +1 @@ -timeout=450 +timeout=180