From patchwork Sun May 28 17:35:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 686694 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D1FEC7EE2F for ; Sun, 28 May 2023 17:36:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229680AbjE1RgU (ORCPT ); Sun, 28 May 2023 13:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbjE1RgO (ORCPT ); Sun, 28 May 2023 13:36:14 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25C3FDF for ; Sun, 28 May 2023 10:36:06 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-30ab87a1897so1437655f8f.1 for ; Sun, 28 May 2023 10:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295364; x=1687887364; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=s3hOp7A+/gdKa6ceniwP9XCSV18QbyWs0ktuK5d8pCE=; b=ARSKmT8Ji7mM694G9E9aohgiCCCxneu6cztqGv5MbAuZ+/k+fo3TYqQ+ingoTubU0t jO9+Tv+TzYWk5unmVa8Df20sZFMen9ZdLvBVzRg2mmAjveVqMUYcwL3i4ZXLnUliamoz vNLmDrv7sMsMEU/lcbvzCLFDNPF/k9Tn4AtFwdDjFVT4nAmGU9/awBD+BGrEsNPR2Brt KajrCx/dcKuOgML/dYwpf0dJPVRxX/WSRBgjZNE1DIwnTlQXxkXwJcPxCyKzDys6qg+q qcUSZrfzISyWEjbP0rUMB6prjGyOt0n4NQnr+PyYVLHOtdaphx+769Ft4afpdnb5Ec3z nzPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295364; x=1687887364; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s3hOp7A+/gdKa6ceniwP9XCSV18QbyWs0ktuK5d8pCE=; b=YpCdQyCl1W07YuhVABQK0RJiSZ7VXHxtWYeB0MvmmX4RRxByOVMJ6sPAAB8NU22vPT pgGXMrPiTcksj3I66Dj60T8FIt3fDTZkR5IFj6z6SjdycCctg/tLNjGoaI6pM3yqXTUC 7uL26A/XzNL7CGpKePo6/UvYzVrk70jDrBWi2XWkKRGVCBzRYz0qgsr2j/hnAsBJ+q20 Ea9wwdORpS22Jb6sKSztcPXYN/EGCIrKhVrnTqjeLXb89W88WS9jNgLFgKBUYE7mCqYN 2hE64Bl8vHFWBhD32zJmiwiOcZp1U+JIekwWlHxzX5yTg8mAdfTmpAK5go+5+9u9wtzu 2C/A== X-Gm-Message-State: AC+VfDwnUa4rV+3WUKEFKry9x68/2S0utfyYzkI3bsnHtGobikEHgOZi rR7QZekwGNuVAfL/OKElVAL/uQ== X-Google-Smtp-Source: ACHHUZ4ZQAV+j4Tdad+xRQQincCNDyTI7LzTsbLia8AtIt4fL/eD5QTDAJ+lyHCtuvtMb4o93rtv5w== X-Received: by 2002:adf:fd8d:0:b0:30a:dff0:7bac with SMTP id d13-20020adffd8d000000b0030adff07bacmr6083933wrr.30.1685295364602; Sun, 28 May 2023 10:36:04 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:04 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:27 +0200 Subject: [PATCH net 2/8] selftests: mptcp: connect: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-2-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3373; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=nA2G9Gp6t/Qi7hdZXemZ3CUHfQrooppvVjw4SfeTdgM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EAjivNWBqEV1EeGg+AXKQ47OeysRwmBS9Wo Dx5NgDv59+JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAAAKCRD2t4JPQmmg czpkEADvdWy4AgG9umn2F8syDixF6Zv7mtOEVs+4v1yt3GBqmSmoBrbk8xiXb+p7wSu3HbXMNaT MOUgvPnvbC3Mbz/1f4U6kIF7rl4s5qwY5BVMmE4Jk0+IEtxJosaHkf/LFG2M4RAAXznVQh7Mqmz XJyC+U2zOSYFb5WTz1mDerVQ9l8VvCrwCrRGQhwfpPnmkcl24AKMfZ9/62O4nZM98PHdRfiA4tG kz8My0w8R2hcWBYN48dEv+P0xUH9vPFg1v2fEQIZGMrgMVX1pH5+0/nC68zfHUqBM/q+P1C0PYW mr8SDROB9k+xVkd3KPgYNHMn/cogQncuAlELwjS4ngCw112/XoQbBCu8vRZcJQvRWu8X/0IfvOk iH7viP9+KWiAg54dvNOsCzIwYTs74do60FAknvovLtoQzkplZHQLOgE4CRL2vvHTWQVS8kRhYJk /vnQl3Z0cSmewYNjYCSaCaI6HUN1rM8rvYeLpH6EzF+++NJA50/m3amzYHJGmtAkvfjFrWUYL1h cEcLEQF7qkwmER/fct4kDrcpAERTEbfPhwdZ8eAt3mual6gNWl6AosRglPN5ilSvX61toYeqaXT 0Q4TQnYmSZgm6FJWQIE4mVSH+xyGUNp4NVgdgAZgZJxwwQQHfsr9hMTaJvzMEaGTxJ4K49mLcpR jaZvUWoMLGk99mQ== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Note that this check can also mark the test as failed if 'SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES' env var is set to 1: by doing that, we can make sure a test is not being skipped by mistake. A new shared file is added here to be able to re-used the same check in the different selftests we have. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/Makefile | 2 +- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 4 +++ tools/testing/selftests/net/mptcp/mptcp_lib.sh | 40 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile index 43a723626126..7b936a926859 100644 --- a/tools/testing/selftests/net/mptcp/Makefile +++ b/tools/testing/selftests/net/mptcp/Makefile @@ -9,7 +9,7 @@ TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt mptcp_inq -TEST_FILES := settings +TEST_FILES := mptcp_lib.sh settings EXTRA_CLEAN := *.pcap diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index a43d3e2f59bb..c1f7bac19942 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + time_start=$(date +%s) optstring="S:R:d:e:l:r:h4cm:f:tC" @@ -141,6 +143,8 @@ cleanup() done } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh new file mode 100644 index 000000000000..3286536b79d5 --- /dev/null +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 + +readonly KSFT_FAIL=1 +readonly KSFT_SKIP=4 + +# SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var can be set when validating all +# features using the last version of the kernel and the selftests to make sure +# a test is not being skipped by mistake. +mptcp_lib_expect_all_features() { + [ "${SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES:-}" = "1" ] +} + +# $1: msg +mptcp_lib_fail_if_expected_feature() { + if mptcp_lib_expect_all_features; then + echo "ERROR: missing feature: ${*}" + exit ${KSFT_FAIL} + fi + + return 1 +} + +# $1: file +mptcp_lib_has_file() { + local f="${1}" + + if [ -f "${f}" ]; then + return 0 + fi + + mptcp_lib_fail_if_expected_feature "${f} file not found" +} + +mptcp_lib_check_mptcp() { + if ! mptcp_lib_has_file "/proc/sys/net/mptcp/enabled"; then + echo "SKIP: MPTCP support is not available" + exit ${KSFT_SKIP} + fi +} From patchwork Sun May 28 17:35:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 686693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6965EC7EE31 for ; Sun, 28 May 2023 17:36:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbjE1RgX (ORCPT ); Sun, 28 May 2023 13:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbjE1RgT (ORCPT ); Sun, 28 May 2023 13:36:19 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7055CFF for ; Sun, 28 May 2023 10:36:09 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30ad99fa586so2280905f8f.2 for ; Sun, 28 May 2023 10:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295368; x=1687887368; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AX0sr/PbmfXMRT0E3FKR7vPpjL8rwaKTtVDAJqhMqgY=; b=EY+2YTKvShTyvWZoi+qEzRbIh7STaLYSxenN389oH5pyQ3B+M6jSpEI8GNpm5CpraP 09RcCudi4w5jNwK0MOlckZAwUlm3hacHFR2OmuNNhyTHNaHquEseO6Ua2wNKnOf7z8vk 0CQjiXnQ/ulYYqxXYEuZqqg3QynYsLTFWrf+qBfEj5MMiGGAuDhGJOato0aChAVOWYmY FBAXMmloa0jrqH7V01MYLn0CyzCw0qOqqxWAvMCn/A76Wmh19/J4Z3BLwlcTCizWspqZ bp9zeWc+d9MSA1swO9j8agu031xbqLLEpAZC/aHWFh5TUsD1PZUELh/BQfcLoWRRoXif Nhyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295368; x=1687887368; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AX0sr/PbmfXMRT0E3FKR7vPpjL8rwaKTtVDAJqhMqgY=; b=cE92N6a7V144g0oLksY+re1jrP9U+t7J7eHztUv3WsfHYwUtvSqOOzc0bjAG/v9hmy Hgas+vzZo6tNoYP6K9CKaI+M0mMGgbBptudRXCaqm8XVouL51tof47NxSos23A0NxI7q 8UcNa/uWKUu5TSj35ouktigxJWa5zlpB5Njg3NUgpSFxllhNjbwGao9ReYTQcJR/fzqC QhqfifhxvxDhqh7CKkUGtqERHqEbN5Ulp/RUrwkxg1ruIAFVpRpvs9IUWl9D7j3CR7jm pCGlV/xo3W106zCUJ4UbZqhTOu3lHFC2Hqoe8cFlYaIrsiqDriRt+CVswN2v0qlGQLDj SHxw== X-Gm-Message-State: AC+VfDybddbnis7vNPPQg6ssCFrXtq3SobMO7KaWfCw+EoahOpWgBmjH ltOY5AJDMHtDSgrFNMni42iNBQ== X-Google-Smtp-Source: ACHHUZ7KAR8RXl6O+5H4v9gJJWlzSY/1hej76B1j5B7n8S6haKDU+hOJztCZ51pMTxrr47XPx0UCdg== X-Received: by 2002:a5d:4ac6:0:b0:309:54b6:33b0 with SMTP id y6-20020a5d4ac6000000b0030954b633b0mr7315737wrs.44.1685295367931; Sun, 28 May 2023 10:36:07 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:07 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:30 +0200 Subject: [PATCH net 5/8] selftests: mptcp: diag: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-5-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1203; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=2XieG7aH+1H6UjQufr7rYq3MJt3yeF3n93mM9qxyF/k=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EBVsy9726j4G9jjMrxnRAZd2w+eAda1JbfZ BSSWuPepeaJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAQAKCRD2t4JPQmmg c90rEADZxBUPh9w2TPif0/EokmXKrf1ty8a3RmkE20WglnJTTAowpUPzIxTQnA2mMH6G4T+iD50 f/vCtbr8xigVWUf2mFE8RY+ijac4XnuctSmaj1SY8L3xTE+3+1k6G/XC8COwJrpcQVE9o5i98Z7 gO/j8Oh47+FMeaUB/xyXEO8T14bbG8w8JnRpy6n3olvwbvMqtuVGEre7BoyuvWpV05Nqmz1DLA0 S5fYqrf1BHCmobd7JGoiFlIiYkuaxee9qm/fi/dEIw0QUgVMq8NSVouzi4kIp6WbPvmn4lMJdre iiAvIO84IN7unWkXg9nVefl8u0x22W7IYsPAByQUSRyIBYAghF0S1UouHO952bCpC0ZF+Nczx25 Rzs5Q2vJgOAdZR3hutsfSeO5YGeS897blfYpL8xW7EDY+CKDvzHaVnFHDvyt2Mc5dcOWXgPUhoE 71AfIOvO+8qs6f57QGqn8T/Kg8EvtrWYXxVbx1iIqi6Q/CkqNlvaLi/KenhiXDOQyO8Fza6Y8KC WBcZvy3JNBOGQA9VZ6d+05SB9vJta8QyZkiSoO6zkVwjsYt1NLobmuv2nkXCHYpaRJzetj3tC7u tW3xlwCtqwXYOAnOPq65RmKtfv73nLWaJ/lsB1GwqXXfxjIwvmrfAXaM4B6eVAunAEM6sNY84Bj VbNoHru1F33zdYw== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/diag.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index ef628b16fe9b..4eacdb1ab962 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + sec=$(date +%s) rndh=$(printf %x $sec)-$(mktemp -u XXXXXX) ns="ns1-$rndh" @@ -31,6 +33,8 @@ cleanup() ip netns del $ns } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" From patchwork Sun May 28 17:35:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 686692 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 928F4C7EE29 for ; Sun, 28 May 2023 17:36:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjE1RgY (ORCPT ); Sun, 28 May 2023 13:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbjE1RgU (ORCPT ); Sun, 28 May 2023 13:36:20 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D7E8C7 for ; Sun, 28 May 2023 10:36:10 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3063433fa66so1521457f8f.3 for ; Sun, 28 May 2023 10:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295369; x=1687887369; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1iFsQSoektVWo2hESWKZtZkktu5l6M6gOCDs+m+CLio=; b=a4tjax/M037J4XbF6dF2XBpbWlJBX6yjwE0k5qXuPWPE3SMUGoct7HZBuY2/j7YKo7 zLaS9ywinq8EuJ+wSZMD7GvdeeNbqs53v22RL7OUxgDe4WJR9rR61MwgR9gFi9qn+nIi BWCiu5P4s3+1xSaP3j3qyLhYbXx9vgnbh7l58Gb0jvS2kFUxNQrAZmJ2YdmT4in6rfy5 iNVmvTr4ybYda6DiBx56ZvNxFsTsMN+zgV+R7HnIq5zmY7eVsZpQLklhLvqBX9nOCWG4 5nd5O0mNuu0OtvOfOztIvPUOxBWgPFVfXgB+6S73fYwzEjGV5Vk1LkijAX4gsKKdaQjG lipQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295369; x=1687887369; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1iFsQSoektVWo2hESWKZtZkktu5l6M6gOCDs+m+CLio=; b=RXR2cpjjcg8Cn+ri3j3ESX7UPjqhCfhh87DIm8XOSrG+DaeNRT5mOYvcXRxw9qPERg KvzOBp1mSFdc18YonqbTbzP3ChkR0782RW9d9i0g6ahmL4QjYWxWXMhsU5St6uWIjfrv 5aJu+fairzbrOe9CiFpdaW1E4HH9LaXsBlfXEatLuluJ5wRBSq1aDp8bareySup8+oMv tR6dZiqCoz5fp5898PbKtTtLgYAIT34F+cldmFHpzR/0Hnq4n3Xu1bN0F4Pvs58esqYj v62wW+pOIjSodln7gWisQzBdHL7D4Ic0kt6NXkEKZlAh3Q1SK/gWkAjmwiUfartWh1T4 vHmA== X-Gm-Message-State: AC+VfDz+3EvckB4B96joRcs4i9jLf+A1nNr7ig5zdToM+cVCeRZ2btam Xh+J4M8fY2pdoSdwGyJIA3dOjw== X-Google-Smtp-Source: ACHHUZ7lEvgV+qut8uP8royK7zsV4iUfaV7/oCLmJ3rXb8INkqqpzBbYMEkUYnHNz2Acj5w8YLFygg== X-Received: by 2002:adf:d089:0:b0:307:9f8:4f30 with SMTP id y9-20020adfd089000000b0030709f84f30mr5825464wrh.70.1685295368987; Sun, 28 May 2023 10:36:08 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:08 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:31 +0200 Subject: [PATCH net 6/8] selftests: mptcp: simult flows: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-6-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1220; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=v3FXhGp3rLA92fFtVw6q1d5taMCbFn424ZxPvKCJnwY=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EBEEKka3mFHa3kBEbaRn4dGVLd1UAKUl96L 82Sf1dCsKqJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAQAKCRD2t4JPQmmg c1fiEACI6DNewO2JBxnZ2diUvafyiEsds+h9elQVCf6sS6J1NOthez6aPSn+CBp8SNYjQ/13MRX RdktsaoaNMf69NKQGm1zIaTlU1e3AJaiwqx6bJcCAnMqEc+BlP+RuV51/AB8F6hc5ORiSHKvzqd sGvFwhICaF8eEbYv+Mew0fqSQexJdcHy9ABHQJEvsWJa5pdSv8Ojl7OWPakE3ldqpSH0L16oBxs ipY3qO+0JkBdpmCBLCbUE6ilkjovLurvmkXpK0k0t4e3aRpk0FhH1mUiTnlj4uaByZHJH53UTwU xuGvAcxiFpg9GCkVQAf8A4peVDReZUlLhw91ftPg/uJJSGly4gfKvaopDA5K9U8+Uj/El4tOQag vVToFZ4asX/o9rThmFzMXJHakRmiufxZG9midl0dScVB0EzsJgaYdPT0LB8h2i19vJUttGkvREo pwfLpSrKgdgwBpK79NU/1JHINZwBJ/qdlPuRjl1bA7rUiYl5e8c1+p9ZoYUCSIX11tdgh4HXsja nU+qmEV4i3xAn0QQwjWSKhPE9atWttMQrl7MC+TtdmRm1stdLJu4NgSPzfGOt8hjWVnac4h3Afk O4dOniWiXgsNnzp1IUflixhjCQ0gnqP+aujJEtMtUPRRgp4dWgLTIFvLWcyVttkK/O/RqFzhnEF 5YxSNMA7W66gO2w== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/simult_flows.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 9f22f7e5027d..36a3c9d92e20 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + sec=$(date +%s) rndh=$(printf %x $sec)-$(mktemp -u XXXXXX) ns1="ns1-$rndh" @@ -34,6 +36,8 @@ cleanup() done } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" From patchwork Sun May 28 17:35:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 686691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A308C7EE29 for ; Sun, 28 May 2023 17:36:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229692AbjE1Rg3 (ORCPT ); Sun, 28 May 2023 13:36:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjE1RgU (ORCPT ); Sun, 28 May 2023 13:36:20 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B80710C for ; Sun, 28 May 2023 10:36:13 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f6cbdf16d2so16037605e9.2 for ; Sun, 28 May 2023 10:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295371; x=1687887371; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Dv/yh1ez4MwkuLkx8esU0Cb+ZDlD0gjn5YXP4X/VzdA=; b=20jbrVmGwi4TuTnfu3xvKOsXYIn/VTHSr6q3sVvyvPG/QkjR4Sw/MXRUzH6Rmwghcd doEj7GBVjVH51Zc4lQmCSAn/fuiZ7VMfzMK3+UTH42K1e8BrbrjvouachZzT3PRKp+mO v7E1gV3hzGxur+ZKqPjaKd2yAOL8x4xeAPV5ZbUMR4YiER/Yn3IfTW/XvVbJnegONSwJ N4dfiTvbeBslFAvsdlqWhN8iuzfaPgMkdkt7CN6u8AioTwyLTL+8SvZfeazFHFTlC1OV WGDZGJwtaWec+oNCU0ZWnvile3cHge48sWDdf1xAUXf1HsfR5vEfG1ZqJip/VOMnAvdI psyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295371; x=1687887371; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dv/yh1ez4MwkuLkx8esU0Cb+ZDlD0gjn5YXP4X/VzdA=; b=SdRjtKWLhATKKBfOB6LlSWFO96iqeISlvrB0XcnwwxMTE3Snw5QifBHrigt6tuf7jb 31Grxyx9n2VG9fBfcV0D1w7N1KcXuMkIw4b7iS5oyCB627eKatlecbx+h2ktl7fOEzzQ Z+yH/LsSTPx1vPu9O37X8IolqrdBKYDLsK7rQaoOuJ9hEPfEupTCWtdXNr1HrUIwQ1FT lnDtbISOWwROepLSTSpqKNqElTcqPseu40KjURON9AsbUTNTeiJgTCxTcSs2ZHq6CRfT B2t095WKDuxpvBjQxGBXlD1ZMJB7pJj0/NPIxqUDD1BNSjgF/BpFjsqxJUMC+TnCUfJP 8HAQ== X-Gm-Message-State: AC+VfDwwj+qEu+jE1GPNCNXDfw2g45lOm6WkfRIwhZXYMAaNL6+s3OGj 706zik93ISHZDqCQsr+2zax3TQ== X-Google-Smtp-Source: ACHHUZ7dC2h3fvG5MNDtlL7Fkgjyh8JJtwzKCQ6vEoZk7kEMXIXObjLWpUoeFImTibNfDjbflG8bsw== X-Received: by 2002:a05:600c:2210:b0:3f4:2b13:f0fb with SMTP id z16-20020a05600c221000b003f42b13f0fbmr8320180wml.13.1685295371067; Sun, 28 May 2023 10:36:11 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:10 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:33 +0200 Subject: [PATCH net 8/8] selftests: mptcp: userspace pm: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-8-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1128; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=KmD6FWDokOOmgvkIHaO501SBS+m5bjw9eufDZhLROe8=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EB0fds7CPvvv1yzueGAxIwy+BEXWt5telsx Es9ICH7W1yJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAQAKCRD2t4JPQmmg czNXEACwTRfzBsR4CqhB9CChs90m1paBf8LijwU92DYy1hFF5RRvMpgUvOagqh/ECw+XEY2yZ8r eP90H0FcEQ4vXKcwDpmArjZVLOhXW4xx/BGyEruSOKgRgS8SyUGRnatPjd/oZTPA6XCQxN6Pqi9 CfGGOhAQRZklZhx/r6yi+2aKboecxPhvtbFBBx3Ty/lRgSiWs6/05puflU7hutnlla3gCPfeq8q PXxK5bVrvkZ8hGVxKYGNdTY8/BNPseMQekCjRVLSA09UXStGVLcSHhzxB1Do4M8Dqm5pWwIIuC2 GYvxBQLWNjPtVmU8ugP+yc4YGlpPq0v/ddffac148wal1l6/SWuBZd8s9eXNZpvqT5wsF3rDss0 ZtMalRi/amRQBhAwOfpNCYM5aCGDVt7O4se99wOFU/wcdIJ8DMpBqbL3oruQ0duQHuuVg27SxpH 5AQiuQWVUK9Q36hMcMWx6qmJgwSATVaku2FGqd7vk6lobbBfO7IiG09ECwvljOChuVCh1r5HnDa pN/+I8uxTfMUEpY5qbxRW6KvTQpf7jYafL6otbyqP7L5qdi3ex5ieAHzJJbpp8NlNww5c1sh8YK R/cKXpb7vyi+2tFeF1JUGR9R7GD2oBWTb3fNVUGHb3nm++LSAMkAP2YwzTS8cnMRtGa3gzptR5X CrqQv1fsMg5Ic3Q== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/userspace_pm.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index b1eb7bce599d..8092399d911f 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -1,6 +1,10 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Cannot not run test without ip tool"