Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp741729pxb; Wed, 6 Oct 2021 14:31:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0cwkytKfPP9GxFifHoF74h4zDubKJpk2PPuiHEffeWk9pEL6YFf5Ur3YHS/9I5CrtK3xx X-Received: by 2002:a50:be8f:: with SMTP id b15mr859464edk.200.1633555890806; Wed, 06 Oct 2021 14:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633555890; cv=none; d=google.com; s=arc-20160816; b=mY9H/nif97PBHSYEa7WR3BUcadl1x+vjI9TKAHI6v0fiigiM7USKxGiKNFHtwMwobV 3Ed/bFCMsgP+n4W3BXs4eVLz59gNBEjY3GY97g4YeEFR2aRZcyB05ZdK45YZWNqqVPUF 11U6apgXECRNPMgbL/iSg5WZqU6SZJoBZgGg2vuDy7SYizdlcD/H4GAXem2yZp58y8d8 CPaKeD2eFWqwRv52qStkem1kzP+R6WN+/OjodLNbScwhFM14ZBakMvBboU00R7Sf7f2W Zf5QfLlPVKN8V3sZyq0iHWkpHMTdbdMdmM0oDN10Z9P8aFA80SOhgerPAxcxrTcZHMVk kltQ== 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=TEIVevLr+KkOe+yPKE3J8X4wJFJQbdygarJo9OKidbQ=; b=a6y9iuT1g4S0GguEO0APkQE9ZpY0jyoq9w/9C0vfwW0RCfXKhp7od2qnBcs4HHnVyO kQ5Oni6odzsAdRKbsVnZI2Iz/F4489w6btss0O6XZqdipAjsN9yWSYlbE42QCES4Xgf+ 5i166oMW4f4FbrL4y0GdtLozM9O2k2OZaznxztbL7TSCwgXmLvCNcejV90KAeSzyRLtH ExBF9/f0N6LpUtelfjK+MUV+Cu9ruj67S3w5aeQjWQXkfw3GdeOiwzG3yQYFlTbkzhwg bsvzjHfCokMZHN2Ts3IzvGjmW2IiZIquaeCGQ+D4WkeOCsVDsozZFyoDpR5f8It5lQa4 dViQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=p0GJzPzO; 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 z20si33969124edd.406.2021.10.06.14.31.05; Wed, 06 Oct 2021 14:31:30 -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=p0GJzPzO; 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 S239695AbhJFV2y (ORCPT + 99 others); Wed, 6 Oct 2021 17:28:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232152AbhJFV2x (ORCPT ); Wed, 6 Oct 2021 17:28:53 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1972C061746; Wed, 6 Oct 2021 14:27:00 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id r18so14970299edv.12; Wed, 06 Oct 2021 14:27:00 -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=TEIVevLr+KkOe+yPKE3J8X4wJFJQbdygarJo9OKidbQ=; b=p0GJzPzOWa+cfAfY7747JRX8oWbNXWM97C+z3apyCRClrxPBjlhMCbhDwrP1n5mIBV RgI9GJMetZmD5wfDzGyGcIQ4EGyVVWS0StFQRyS/V0XPGF5xxBxlfbkKcRTeVla+EY3C sSWC++lI0pD0Z+2zRCLmlsVf+tDEfw7NBO9DFupQAZe2XPKEg22DASeETxnztVfVYe4p 5rnWbtkj/LTjQ8EaBANyPrukGnYuemEPj5T3nnk8jJCkuH2OqbMWTLwYAl7ZfYhQBAgO 21waD25l8+vmUCrtobkSWroSM2MkCUTjDEtSVI66OO5KNMh/RX4SFGDl0a1qnUoOSt+Z QrNw== 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=TEIVevLr+KkOe+yPKE3J8X4wJFJQbdygarJo9OKidbQ=; b=ZaBL33TLosI14z+pOCna39qRVpA6llOL3BIFAU0HducJNYYYMjwd/cKaIM/d2BGWWF FzFmrbk5ZOHU/hH0ZCkUdfPvH2USRl74vThiGU0yt2E2LX5DC40iqBNGcjH5BHgSrXd/ dwa5Gygyt3OS4wgsgKBnG04JKeLXDQk+nTgfzbI0U9PCLif9b5n3o1yed0xQ2bdv/bIM 48fMF8VrsyGgV3+Www+BvbzsWulSXdUaQscFo2606+odX/G7c2ho2vRRFD5YvIjrHzdA OCGfkkESW0YpegVRqs1u4Db4eC+uIsbxujtOd7KbZBMf+vR7KjODchAuazOGy5VUDgaM 4myA== X-Gm-Message-State: AOAM5322PQvE9EnYS3EBJVAta+Kb6MpAT4ZXsAdc1KaQRCMJ2aoxuaaL 2SE25lSURcjb+QP31+QWINVmnafYO66NwEBFiuhqBA== X-Received: by 2002:a05:6402:3509:: with SMTP id b9mr780972edd.187.1633555619218; Wed, 06 Oct 2021 14:26:59 -0700 (PDT) Received: from ?IPv6:2a04:241e:501:3870:473a:8ebc:828b:d6c6? ([2a04:241e:501:3870:473a:8ebc:828b:d6c6]) by smtp.gmail.com with ESMTPSA id x16sm5204655eds.92.2021.10.06.14.26.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 14:26:58 -0700 (PDT) Subject: Re: [PATCH 11/11] selftests: net/fcnal: Reduce client timeout To: David Ahern , 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: Leonard Crestez Message-ID: Date: Thu, 7 Oct 2021 00:26:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <3ed2262e-fce2-c587-5112-e4583cd042ed@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. -- Regards, Leonard