From nobody Mon May 6 00:19:23 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:9f92:0:0:0:0:0 with SMTP id a18csp480236jam; Fri, 4 Feb 2022 10:33:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsOh4BGZ1FX1y2cHZkOx6xxBcUMonXyguBbWNkGJVu6djE5GORCoj1ewYfzts8lRWnRaer X-Received: by 2002:a05:622a:13cf:: with SMTP id p15mr227453qtk.389.1643999626805; Fri, 04 Feb 2022 10:33:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643999626; cv=none; d=google.com; s=arc-20160816; b=raebbFi3cMkTgTw9WiQRzeifpjzbHhWZUgluz94mL/+eF7hmKTXx04B08S85ze9xLH dnzyiMP5NYFwTx7jLNqzI8Rvo/Iw86XSJ3ppcYiCG9B7A0eHBPoIVTtEHUZuRk4/x1UX yX6Yq5QIEUBP2tg7jXy29GOgObk6R+AojxUFT8d7z3O76ximHHecEteN5KWpsqn7cCZ7 FpJLXlxF769xfvYfM+5vXl8CvZiidJDyZmxCwD/DhtqnB6aIjdXQou0eK8Qx6Srzo8UB nLEaB1az3/4yoXcf7gbbgo5F1fotxyZ4fsSEPx1LgjsGuvbwtcIwa/VzMvT2s8ysIqU4 Sgog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=uy30Kkwc28iiD0JcRveTF38kw/ho6PTLSdspXkHHDfE=; b=Ee7WUK7NIiAiy5vsErnwhYS6/LnK8HqMyql1mm+L0/JpOq0hNlMZMymTp3T0eOUlBs VlnWPkFo8xuTg083nZJnteauWiNszWPzOSL+UwlnbiJ2WkHWgttpmKk3QN34eQsQfRx0 FRqpEtJHiUcd5TztFFBeEcq4CYKCruBAr0qiKMA2cWgSy0SRYTTOMRre5CaG/mB8y8z7 sl4EDR3JWXU2y0YU5JcqYlZs/coHsSO16p7D+rJ70FRdNxtq0thFlC3us9leFIWRGyL1 qhu/RdOUqhUsuLujox0ZVCB84CZcL9y0zNkE6oboe6v/y24TxI9ym4FHUMHaFE5qjCxX M5tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="hBIB/93U"; spf=pass (google.com: domain of mptcp+bounces-3471-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-3471-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ewr.edge.kernel.org (ewr.edge.kernel.org. [147.75.197.195]) by mx.google.com with ESMTPS id i12si675054qti.721.2022.02.04.10.33.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Feb 2022 10:33:46 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-3471-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) client-ip=147.75.197.195; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="hBIB/93U"; spf=pass (google.com: domain of mptcp+bounces-3471-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-3471-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ewr.edge.kernel.org (Postfix) with ESMTPS id 7EA8D1C0D4F for ; Fri, 4 Feb 2022 18:33:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AA3C2C9D; Fri, 4 Feb 2022 18:33:45 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B69BA2C9C for ; Fri, 4 Feb 2022 18:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643999622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uy30Kkwc28iiD0JcRveTF38kw/ho6PTLSdspXkHHDfE=; b=hBIB/93Ufhm23Vv/Cd8mJ9b81t1g/hlWSvL61976FG1FAHM5k+f+SIzJ7xU0eQAzKIuVhI AaSAVfeo/zB9xkToGLiIe3sPPCoIj/quRUCz3sjw+S0NBoQp8cBnrGRBfpK9Wt88et92ZY sE1pLJhx20SmF3v/hsi8Ng9k67L52Ak= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-164-hkjtrz_kMnO4VYE3PlazJQ-1; Fri, 04 Feb 2022 13:33:39 -0500 X-MC-Unique: hkjtrz_kMnO4VYE3PlazJQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE066593BC for ; Fri, 4 Feb 2022 18:33:38 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.194.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C248838CC for ; Fri, 4 Feb 2022 18:33:37 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH mptcp-next] selftests: mptcp: improve 'fair usage on close' stability Date: Fri, 4 Feb 2022 19:33:26 +0100 Message-Id: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The mentioned tests has to wait for a subflow creation failure. The current code looks for TCP sockets in TW state and sometimes misses the relevant event. Switch to a more stable check, looking for the associated mib counter. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/257 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 67be3e1215d7..556da9481730 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1137,14 +1137,14 @@ chk_link_usage() fi } =20 -wait_for_tw() +wait_attempt_fail() { local timeout_ms=3D$((timeout_poll * 1000)) local time=3D0 local ns=3D$1 =20 while [ $time -lt $timeout_ms ]; do - local cnt=3D$(ip netns exec $ns ss -t state time-wait |wc -l) + local cnt=3D$(ip netns exec $ns nstat -as TcpAttemptFails | grep TcpAtte= mptFails | awk '{print $2}') =20 [ "$cnt" =3D 1 ] && return 1 time=3D$((time + 100)) @@ -1256,7 +1256,7 @@ subflows_error_tests() TEST_COUNT=3D$((TEST_COUNT+1)) =20 # mpj subflow will be in TW after the reset - wait_for_tw $ns2 + wait_attempt_fail $ns2 pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow wait =20 --=20 2.34.1