Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp896161pxb; Wed, 6 Oct 2021 18:22:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJeWkd7MFB0O9vcYetVeHfROsKkmh3lOabstUuL3yPJp8Zv9MhO8742PacuiUiXR2d9cz3 X-Received: by 2002:a17:90b:1211:: with SMTP id gl17mr2173491pjb.3.1633569775396; Wed, 06 Oct 2021 18:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633569775; cv=none; d=google.com; s=arc-20160816; b=kNPCOPU2cy3ZI6xIKgwT27JjdeAP9s2AIRvtbgnwYubfTx8odSjY4QteYE8nOFiLu/ g8HCuvbtpFaUk9roCryj9cUxPtOb/F0HmCa6wTA1GimIxnnW4QZniUPLGVuGo0kE8Uvu HVAkYWUg4l+XPwruLFqBTP11CTTpKtmR0YWkCKkF42eAYWDkJd2bmRHoYVa7p5k7Q3bU GZbw2tx8P+py9f2jM25yBJVbb7qUucs5mCU4HngiMKXXws0vBJyFt9smI7wNjfhMS9Fn iS4XDYAcgJW1WHQkiKlN9ZYX62e1OKsPM6CYVcaCDWRNUGyjmK8Tk7yALHuy7cr/Ophw QS2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=jT9z8RRT0XYjL+Fp0fFDi5Odn8ZxEN6A9XJGxWw8lg8=; b=s8m69u8zreJ6Z51Y4x9F12KcTTNWOBNxkf6yHH68bn9J8PUkAEONyUAp/X8aqGX4Ww WVhJvWMLErY2SXWg6qhsSavfbgbvxjXt+9MNzdQ+8zGaX7ahdAWZrfPgrfdU06Nz4lii mtl6ljC8qO0Hk4lFpzNuTr/bz9b8IP71llDRslzi/X9mrR1cZrd4cWBhz64hLQ36lCqY JpLgdRa7ymje47Nh+LWdsxmcP7iWbSMHxMmr/j7UhOxRcX/GyOI7zG6PsPfoRZW+dkix Fdf9ww+29jEFIMLwtz09YDgoYOcUAmbVuKmnht5NK6P2B4/mHBd7qpmOiaibsrRoJDdY coeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HP9QVcmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si8809046pjh.113.2021.10.06.18.22.42; Wed, 06 Oct 2021 18:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HP9QVcmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239778AbhJGBTm (ORCPT + 99 others); Wed, 6 Oct 2021 21:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbhJGBTm (ORCPT ); Wed, 6 Oct 2021 21:19:42 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82AD9C061746; Wed, 6 Oct 2021 18:17:49 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id h16-20020a9d3e50000000b0054e25708f41so4691072otg.0; Wed, 06 Oct 2021 18:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jT9z8RRT0XYjL+Fp0fFDi5Odn8ZxEN6A9XJGxWw8lg8=; b=HP9QVcmSp8NN3FqweRkOGP4M76pSrRIIOtOPfKadKK20lVgfJPapDLoY8r/pYW1MsH YZi6gn+rHkuPdHP4118JDz+t6vBk+phqGm338GRW74850DjHmJuSBZKy4TyyI3Jerucb +O/xf8Bi5XMdcpNsgbHhSuSgn8qjYjeMB8GlSWKScHE3gpsVWwObkZ2u4/qRL4oZ9JPm D9bPKwB7Jf0ewRPEX8EJW9qkJi5eOGFKd1xXjXMXVTFEXnuY+2uQuXUxGZFQi95OdbHr Eqvw9TKDL7I5ru5bOpZwnNnVMc17mIPvlY84As3svAfH0/zbp2KHU4Gf3QlvWrBd0XHv P1QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jT9z8RRT0XYjL+Fp0fFDi5Odn8ZxEN6A9XJGxWw8lg8=; b=xLyM6hmYFifdB6qQwqwG13rQZ7O+l8yeaaChqmcgvKWSgCcvWzSLmxFsOG476A/JO8 Ib1uCD0jQELhSx5vrrg4QhLB9KVfmDev8oL+LC5yVXiKEtWrmnKMA7GHC2e8rU1tjKYG NsFyg0TlJVK1J+vVLqbe4WOtNgnthe0O5phN2SeHWoMraSSOq1g8uEBItU0UmkYYwrpv R3E50uqkS34xu/zSf/BsbNdVYVDaFVC1GYfBOBPreN4ku3RRFagiraKH8zMsi0+OjH5O 7acJn5JAoTc2uYJhxfitliSeEn91B9MI3L/F6BDsHMdGa3PqTwMz229TuXfIFUIBG2kv Af7w== X-Gm-Message-State: AOAM533HjTV2Q5fFatvXwZVcd6mqaLrw4OV5N9ayciap045BNXSBZ51y CruspAYPEjDz/2KvBPQGFyyXT2Dckz90Bw== X-Received: by 2002:a05:6830:112:: with SMTP id i18mr1279668otp.186.1633569468757; Wed, 06 Oct 2021 18:17:48 -0700 (PDT) Received: from Davids-MacBook-Pro.local ([8.48.134.30]) by smtp.googlemail.com with ESMTPSA id bl23sm2655160oib.40.2021.10.06.18.17.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 18:17:48 -0700 (PDT) Subject: Re: [PATCH 11/11] selftests: net/fcnal: Reduce client timeout To: Leonard Crestez , Jakub Kicinski , Shuah Khan , David Ahern Cc: "David S. Miller" , Ido Schimmel , Seth David Schoen , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <516043441bd13bc1e6ba7f507a04362e04c06da5.1633520807.git.cdleonard@gmail.com> <3ed2262e-fce2-c587-5112-e4583cd042ed@gmail.com> From: David Ahern Message-ID: <65ae97e3-73c1-3221-96fe-6096a8aacfa1@gmail.com> Date: Wed, 6 Oct 2021 19:17:47 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/6/21 3:26 PM, Leonard Crestez wrote: > > > On 06.10.2021 18:01, David Ahern wrote: >> On 10/6/21 5:47 AM, Leonard Crestez wrote: >>> Reduce default client timeout from 5 seconds to 500 miliseconds. >>> Can be overridden from environment by exporting NETTEST_CLIENT_TIMEOUT=5 >>> >>> Some tests need ICMP timeouts so pass an explicit -t5 for those. >>> >>> Signed-off-by: Leonard Crestez >>> --- >>>   tools/testing/selftests/net/fcnal-test.sh | 17 +++++++++++------ >>>   1 file changed, 11 insertions(+), 6 deletions(-) >>> >> >> The problem with blindly reducing the timeouts is running the script on >> a loaded server. Some tests are expected to timeout while for tests a >> timeout is a failure. > > Keeping the default value "5" would be fine as long as it is possible to > override externally and get fast results on a mostly-idle machine. 5 is the default for nettest.c; the test script passes in -t1 for all tests. > > Placing a default value in the environment which is overriden by certain > tests achieves that. > > In theory it would also be possible for fcnal-test.sh to parse as > "--timeout" option and pass it into every single test but that solution > would cause much more code churn. > > Having default values in environment variables that can still be > overridden by command-line arguments is a common pattern in many tools. > It also avoids having to pass-through every flag through every > intermediate wrapper. I do not agree with env variables here.