From nobody Thu Sep 18 06:45:51 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:ab0:35eb:0:0:0:0:0 with SMTP id w11csp6398uau; Thu, 16 Jun 2022 06:56:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhEYq5WtAYXzh0TcGgoyueODtAWWb+3maLOIy8ClvavpTqU9eCtHwb899zm/HW80KHR5T8 X-Received: by 2002:a05:6808:3027:b0:2f9:6618:ea55 with SMTP id ay39-20020a056808302700b002f96618ea55mr7979947oib.247.1655387789842; Thu, 16 Jun 2022 06:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655387789; cv=none; d=google.com; s=arc-20160816; b=oIgD1zA1vfGTOYACk7uYCHFuKP8dziFSQjCNGw3rFEg2477P3g3sC4X37ZtEtZMS+Y v5ZSO6Ro1yUiss50MzvVNJNDg4nFZvkVobVsstfWiqV96Dhj0olOmJX+o/iEZ+xT0eCh jUzh1sobfuEwDmU3Aab6OQLrX57+SzULPN9w+HaF2xveFL4rtZziqZmD1uwoUe0Qtuan BeUsAbw4reD73i1cWlPJo8Zi3HhuC/TKh00LR3ZY9xrIP4kly8sEjXvr6tl+ywsKztJW 6tTBA4XQtFWl4/X4HwY/5bgA7vOJ07qrS3ABcbP5w3sOri73kRkQbTX8pI9zhPPfUT2p k0+w== 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=gWeBCyh4HWwcugZn1ikAE1myQGLo/gYWZyJva0YmXVs=; b=vo9KT5lBa9rp67kHYjBwOqlZ/8Eun+ZOlyQ5D/M663jFaCGWhBOlnCqnz2Hl08W6tb D5l8jV1RQX3FgMFACdJXBQfLnW2L9czi86Eho5EM5vf4u34z9SdIy/dAEYjBCqAZuv94 wtaidbbLEXR2+EqlCUlg0TEHZoRctbzSFMaGmoW6NOIxGCg5vEC31W+Wxcub7u69cjsu yFdiTDwS/YrBik6K6KS9eg9zMWgOyAcFDCsDgpPnQjj4KHHIchrIjxskm6wp99Ht/CUT P3UIuhSyI/UuXv3jr6MesuJWP9+CSQWSWo4ZAhjoP0mhTd8+PLbuwweXvKNMwdVCE7Li +0Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hxY3XFos; spf=pass (google.com: domain of mptcp+bounces-5680-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-5680-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from da.mirrors.kernel.org (da.mirrors.kernel.org. [139.178.84.19]) by mx.google.com with ESMTPS id bk37-20020a0568081a2500b0032ebecf2d32si2037338oib.235.2022.06.16.06.56.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2022 06:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-5680-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) client-ip=139.178.84.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hxY3XFos; spf=pass (google.com: domain of mptcp+bounces-5680-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-5680-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 da.mirrors.kernel.org (Postfix) with ESMTPS id 799892E09DB for ; Thu, 16 Jun 2022 13:55:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11311290F; Thu, 16 Jun 2022 13:55:58 +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 A2F5928E4 for ; Thu, 16 Jun 2022 13:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655387755; 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=gWeBCyh4HWwcugZn1ikAE1myQGLo/gYWZyJva0YmXVs=; b=hxY3XFosFmFvgmwXQT+ZweuPd1To1aSTJJ3v/3a61kYOx+cKPWFgHWTEekWZDOqlR3PIRB kbeNOwmM2Xf+ekzRkuuJzFDvnsHEVE2D3rDbReBHZneuCsSkgztSWHNuODiZFb9J77RuXy VCqeoE67rY33ZmTcDfgkDwMJNVeLCb4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-508-GWjbrsggMCqp1pNHy2JuIg-1; Thu, 16 Jun 2022 09:55:54 -0400 X-MC-Unique: GWjbrsggMCqp1pNHy2JuIg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5991585A580 for ; Thu, 16 Jun 2022 13:55:54 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.193.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEA621415108 for ; Thu, 16 Jun 2022 13:55:53 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH mptcp-next] selftests: mptcp: tweak simult_flows for debug kernels. Date: Thu, 16 Jun 2022 15:55:48 +0200 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.85 on 10.11.54.7 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"; x-default="true" The mentioned test measures the transfer run-time to verify that the user-space program is able to use the full aggregate B/W. Even on (virtual) link-speed-bound tests, debug kernel can slow down the transfer enough to cause sporadic test failures. Instead of unconditionally raising the maximum allowed run-time, tweak when the running kernel is a debug one, and use some simple/ rough heuristic to guess such scenarios. Note: this intentionally avoids looking for /boot/config- as the latter file is not always available in our reference CI environments. Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/mptcp/simult_flows.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/test= ing/selftests/net/mptcp/simult_flows.sh index f441ff7904fc..141fcf0d40d1 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -12,6 +12,7 @@ timeout_test=3D$((timeout_poll * 2 + 1)) test_cnt=3D1 ret=3D0 bail=3D0 +slack=3D50 =20 usage() { echo "Usage: $0 [ -b ] [ -c ] [ -d ]" @@ -52,6 +53,7 @@ setup() cout=3D$(mktemp) capout=3D$(mktemp) size=3D$((2 * 2048 * 4096)) + dd if=3D/dev/zero of=3D$small bs=3D4096 count=3D20 >/dev/null 2>&1 dd if=3D/dev/zero of=3D$large bs=3D4096 count=3D$((size / 4096)) >/dev/nu= ll 2>&1 =20 @@ -104,6 +106,13 @@ setup() ip -net "$ns3" route add default via dead:beef:3::2 =20 ip netns exec "$ns3" ./pm_nl_ctl limits 1 1 + + # debug build can slow down measurably the test program + # we use quite tight time limit on the run-time, to ensure + # maximum B/W usage. + # Use the kmemleak file presence as a rough estimate for this being + # a debug kernel and increase the maximum run-time accordingly + [ -f /sys/kernel/debug/kmemleak ] && slack=3D$((slack+200)) } =20 # $1: ns, $2: port @@ -241,7 +250,7 @@ run_test() =20 # mptcp_connect will do some sleeps to allow the mp_join handshake # completion (see mptcp_connect): 200ms on each side, add some slack - time=3D$((time + 450)) + time=3D$((time + 400 + $slack)) =20 printf "%-60s" "$msg" do_transfer $small $large $time --=20 2.35.3