From patchwork Wed Mar 3 22:43:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mat Martineau X-Patchwork-Id: 1446930 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=) 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DrTYJ3JWLz9rx6 for ; Thu, 4 Mar 2021 09:43:16 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3BAED100F2240; Wed, 3 Mar 2021 14:43:12 -0800 (PST) Received-SPF: Pass (helo) identity=helo; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=mathew.j.martineau@linux.intel.com; receiver= Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 51276100EB35A for ; Wed, 3 Mar 2021 14:43:10 -0800 (PST) IronPort-SDR: Y9L+g37d7wePDdn0b7PxsNmg+kWCCdlpLPz6yp1jSoJrSMcVO/WjvaC2BKmZyVbjW4rApsuioo mPWZIa72GmOQ== X-IronPort-AV: E=McAfee;i="6000,8403,9912"; a="166549098" X-IronPort-AV: E=Sophos;i="5.81,220,1610438400"; d="scan'208";a="166549098" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 14:43:09 -0800 IronPort-SDR: yB2T6ZOMjrJRTeM0hNIzIZJIOXCf9AlBA4zFaLjaWWtmqOt4Gtk/eAIU0nHEQzxXJnOncmibwB B++c4SnE9Bsw== X-IronPort-AV: E=Sophos;i="5.81,220,1610438400"; d="scan'208";a="507048281" Received: from mjmartin-desk2.amr.corp.intel.com (HELO mjmartin-desk2.intel.com) ([10.254.92.178]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 14:43:09 -0800 From: Mat Martineau To: mptcp@lists.01.org Date: Wed, 3 Mar 2021 14:43:00 -0800 Message-Id: <20210303224300.95599-1-mathew.j.martineau@linux.intel.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Message-ID-Hash: Q6ZJR7Q64BUPLHSY5FXCS2VUAUQJVLAR X-Message-ID-Hash: Q6ZJR7Q64BUPLHSY5FXCS2VUAUQJVLAR X-MailFrom: mathew.j.martineau@linux.intel.com 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 CC: geliangtang@gmail.com X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH mptcp-net] selftests: mptcp: Restore packet capture option in join tests List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The join self tests previously used the '-c' command line option to enable creation of pcap files for the tests that run, but the change to allow running a subset of the join tests made overlapping use of that option. Restore the capture functionality with '-c' and move the syncookie test option to '-k'. Fixes: 1002b89f23ea ("selftests: mptcp: add command line arguments for mptcp_join.sh") Signed-off-by: Mat Martineau --- .../testing/selftests/net/mptcp/mptcp_join.sh | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 96379ede5925..4d7dab0bce7a 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -12,6 +12,7 @@ timeout_poll=30 timeout_test=$((timeout_poll * 2 + 1)) mptcp_connect="" capture=0 +do_all_tests=1 TEST_COUNT=0 @@ -123,12 +124,6 @@ reset_with_add_addr_timeout() -j DROP } -for arg in "$@"; do - if [ "$arg" = "-c" ]; then - capture=1 - fi -done - ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" @@ -1368,7 +1363,8 @@ usage() echo " -4 v4mapped_tests" echo " -b backup_tests" echo " -p add_addr_ports_tests" - echo " -c syncookies_tests" + echo " -k syncookies_tests" + echo " -c capture pcap files" echo " -h help" } @@ -1382,12 +1378,20 @@ make_file "$cin" "client" 1 make_file "$sin" "server" 1 trap cleanup EXIT -if [ -z $1 ]; then +for arg in "$@"; do + if [ "$arg" = "-c" ]; then + capture=1 + else + do_all_tests=0 + fi +done + +if [ $do_all_tests -eq 1 ]; then all_tests exit $ret fi -while getopts 'fsltra64bpch' opt; do +while getopts 'fsltra64bpkch' opt; do case $opt in f) subflows_tests @@ -1419,9 +1423,11 @@ while getopts 'fsltra64bpch' opt; do p) add_addr_ports_tests ;; - c) + k) syncookies_tests ;; + c) + ;; h | *) usage ;;