From patchwork Sat Jun 10 16:11:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 105975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1626149vqr; Sat, 10 Jun 2023 09:14:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6GEZzvquZc9srPVudZalmhPE3A51P7p6USuJC8bHrjFgBHRPLA/8fmkTNuADnwHZwgPLRp X-Received: by 2002:aa7:d6d5:0:b0:516:2dcf:d027 with SMTP id x21-20020aa7d6d5000000b005162dcfd027mr1702196edr.10.1686413685305; Sat, 10 Jun 2023 09:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686413685; cv=none; d=google.com; s=arc-20160816; b=niXjT1E+amLW+nAHGCk7OVldmIQksgSCwwWwuK7dAClDtoDEh23XhloubNShCxjFoM M6ShRV32KIBsJbJwttr07RWeuf/g9H5gUO6GJyIC5bTSmHKY5lsC6JI0QaHqp+9ZgfQ2 Iw1fohnpmHBedemzjoxSUtgh9Bc0srKMZd/7ek1gZBHOtjWGIpPweNgGCpnO1sCu6Rll yf7jEgC57OKXdYfaRMOOoSmQYmJILGvkzyhW+OrQwegpbTSZfpTijWar1QvWBJdzizQG 6dy/r1WUMY5Ip4FgZtHmc8sWJBstJyV0QPo+JezCgSp4ZeUlDBD2/JgEc9A744BfXQH4 hbdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=YUHaQF9C9UJgnrQYwO0kb39FALtMlGaWS5DDHraXgNc=; b=drNlf9iTzpbZP6ycSe93HCEQgc5kszQW9t4UXYr8FKS6/40gdNLwFmeuaSnYwmABsV AZkft8ksYTop+sExW62g7dkySkeWy/+3ln7a3E/X6BSsJhvndmjKlKFIMSdsuQ6r0KmM KKJOfFndU/PSxm4VEQcBOwHSSUO3ufoFSaK+WKN1tkHKRFQPisGxrTh3sEBCpIZR5IYX CDpa54YxwCtAQpTLK2I9Hk8HQlVSvXd8cAp4/vQa3ZQYKqIohVZf2LINkAfl/i+ZRoh2 xv0gYHVDICX9x2hu1+pQZ/yAe7oRPONsYLvnyUlit7jJjZERCuyIbHPszgjTbT2oMyOr mrFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=3eHHzU7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j18-20020aa7c412000000b005060bdc3b1dsi4015234edq.83.2023.06.10.09.14.21; Sat, 10 Jun 2023 09:14:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=3eHHzU7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231389AbjFJQNG (ORCPT + 99 others); Sat, 10 Jun 2023 12:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbjFJQMo (ORCPT ); Sat, 10 Jun 2023 12:12:44 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 962E63C02 for ; Sat, 10 Jun 2023 09:12:20 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-30ad458f085so2053114f8f.0 for ; Sat, 10 Jun 2023 09:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1686413525; x=1689005525; 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=YUHaQF9C9UJgnrQYwO0kb39FALtMlGaWS5DDHraXgNc=; b=3eHHzU7V9iCW2QqCzcYB/kyaM9Sb/8xd80ozJmG+Y/gnaqKemXsqZN3aWBVLoPV4Xa Xuu/Xh933Exykjef8i9Mzu9Od1h0SAVrAeAB4pMJmX6mnLKBMk0JGIiTPHYsaxWstQhR 3Rl45653b7m/i+QG7J/tXZjlRfd+VSJ7QeNYfcrswh2iu36fqBxAJ+OyIY/iCewO6XSk JdxUalVqeIxKIb8067UtKWuhq+EiNL+KRreDZUL/FAADir2NAJ+muvG6mpsDB1qRSn7b dDHEJvhKVlfmpGLrMcGzbbM124Gifjtu1xp5NnVwiv1+5pUwYzD1kJ8jFCxZmVMkGez9 38Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686413525; x=1689005525; 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=YUHaQF9C9UJgnrQYwO0kb39FALtMlGaWS5DDHraXgNc=; b=Qep/8be/cLjcxxa9JoDfBCYmGc3CWKia4PiKnDK5dQAYhZ+dArXLLjPPafzI9wbTkN 2kGHvbjDRnyJCYoIOKu1arwKw4rC1xrV9TbuzkhkYnDdwbGOMqa6iSfEewCdS9kNRTW1 R3/D0Z9xStzKWZeeFnaT66P+aCd+Z7+JAv9ui7HB9cxFdYwacb7ZJFniBKPHrNLyAEQI J9snED80cn6hYhcX/jw9P/wp+AI8cKml78PW7R/FwRBZk2ySMLFP67RFQaLwujumL/5l /xDKOkFJJxaYfRKdQKzJI5x3v0dIeqcDInnMY6URwEPsPI+3vVVF7tGmqwq/7SJcJqkw qXpw== X-Gm-Message-State: AC+VfDwe2G2JzWR6YxkPn3S18m0gDHbkOYp1/D6gzUkkcFsJYOZVuP5u pMn/TkQUphEvHovhJXvmyMuoaQ== X-Received: by 2002:a5d:4887:0:b0:30a:900b:6bf4 with SMTP id g7-20020a5d4887000000b0030a900b6bf4mr1674642wrq.0.1686413525688; Sat, 10 Jun 2023 09:12:05 -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 u9-20020a5d4349000000b003079c402762sm7431145wrr.19.2023.06.10.09.12.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 09:12:05 -0700 (PDT) From: Matthieu Baerts Date: Sat, 10 Jun 2023 18:11:50 +0200 Subject: [PATCH net 15/17] selftests: mptcp: join: skip PM listener tests if not supported MIME-Version: 1.0 Message-Id: <20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-15-2896fe2ee8a3@tessares.net> References: <20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-0-2896fe2ee8a3@tessares.net> In-Reply-To: <20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-0-2896fe2ee8a3@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Florian Westphal , Davide Caratti , Christoph Paasch , Geliang Tang , Geliang Tang Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1324; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=POtE7jKpTIYY83aubXV5/Xbyae8R1ULpdCYpNXP6iBo=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkhKC+EUgKEzwh6bj0Ly3esf8ARmZJ22bVcjB16 WqjHwOxn6mJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZISgvgAKCRD2t4JPQmmg c/giD/9vj/TTJijj79ucofvm4lwWlNY6OFUfSCfb/jn3JEwSl89sDaRXECImN/RtEavOuMx5ZAn ioEVixMmpQB2TQYEMSn8SWn++nXeQQUYpL4GmgE/oeFM5g358IIQi9piuHHofEb2rCszfTKcQ9z Un0JjAsgW7jLLXFQ/RPZSDZURF30efPRCgE6wC9uNvLV3zOl+JC6BA5gTnnikX+youdTiZCMKPw gVC6Y7QPnErxi5ZnM1/3WrEao1lVK5cY/RNm38w8wiqzCNSu76GshqTJ9ftKz/35UbWx0HP0acx +wz6nNautjtVIESZerjTdNf8zHUQIhyBWpAo7C/LfsZzEktb4PaGQfQAUDzhqEmnX47dyh6bPa+ 1tuxL+vQBEeW5s7nCuIdsu6kPxl6Pj/Jws2w4y0rLeT9juw7K5FN4XCr9MhomGACh/SbRWzyluW 8414weBKSYNePAhFXRYJxiVTJeb+Lawqs2xWuf34m4WHcuURFDGT3GFdpnuDBTjhMLJ1Z8BPRxN K0CoGNMKyQTAyoOLNqxT8RhEIFrnQQ7PEI77AFEWjRm7+sqvSR/7dG+Kd8hBUOXUdb4x1YCTI40 R/cArTTxX9ERa7Fksf3nbV8yvIcJ8Vn1RQbqryA42fHp6oJhe7OII/8v2R1ozTbLlo5TthV2+Cx y2jqEAylwpbZPpg== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768332916912078036?= X-GMAIL-MSGID: =?utf-8?q?1768332916912078036?= Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of PM listener events introduced by commit f8c9dfbd875b ("mptcp: add pm listener events"). It is possible to look for "mptcp_event_pm_listener" in kallsyms to know in advance if the kernel supports this feature. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 178d023208eb ("selftests: mptcp: listener test for in-kernel PM") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 554fcafd6e8a..0c22efeba675 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -2774,6 +2774,11 @@ verify_listener_events() $e_saddr $e_sport fi + if ! mptcp_lib_kallsyms_has "mptcp_event_pm_listener$"; then + printf "[skip]: event not supported\n" + return + fi + type=$(grep "type:$e_type," $evt | sed --unbuffered -n 's/.*\(type:\)\([[:digit:]]*\).*$/\2/p;q') family=$(grep "type:$e_type," $evt |