Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp45114rwb; Wed, 10 Aug 2022 18:59:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Ry4bNXelqS1GgrHBS4FWlkxsye+lR6WJEpl/76OzUTFr9/h7mU8hRR2iWBgzYWfJ29Jke X-Received: by 2002:a17:90b:33cb:b0:1f4:f635:93f8 with SMTP id lk11-20020a17090b33cb00b001f4f63593f8mr6682321pjb.74.1660183179646; Wed, 10 Aug 2022 18:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660183179; cv=none; d=google.com; s=arc-20160816; b=Cb4jpFvEjPqZOu5EclRQiW4lxVQexAY3axFvawvPTkjOGYgdcHY0tiGgMnjf1j7Ygo Kn76xQexIHtdsICtjcwZNKvbpfn1E90ELc9GdKlZxmgnAP+30NVozL+/N5W47/QxrMKI vOsfblR21WJwCn8qkwK0utT6ZRN5oWabVxzwI9JRk3sqHBuoCgMZpus2cJ4Dw9W1Q3XV ZeMg9OhZg5QHydz4tEGKwScEsyh3pNKYb/hvXgfWHyclfayiiVAEdEfb5xqnZrfPfc/B ZO+wmmcCcjSjJ5akQNOBUVX+oWZ+FJHoNk7AvhxtqGjScWihSissXtVjhZDOa/rc8Xla bpzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F6hxhK/CjlN1f5v5Y2g2kDzYo8Q8zwKdylN6nrbEMvU=; b=zhG231TMenk/ExNiD1j3fwA+4qU9gislspn25sI/CO0rOhoWK+C83mXTF2RWgTq+rI MszP59Qsnt/ziON4jq2ebIkwAN6T9uoIK2K4UUTotvXCT54tCFxSyIB3/yX0x9vDqOPD EVAGXNG575TPB9sRBVKP4NhG0xOtdNjEnWytPyvPiweunAX/oE3B1sbowljvkZizgG0f m/T3eEE0crNGGXg1wu7W+yYupL7YqSkic7NP2Kc7vfWYMLuhhoOBWHLhCsdHpfTzi0fY Czfb1hukBty6Fv6i5VkIt4pP75DCJ7m99WD/eTeBPxWv44R0dT47AnlRkZXzYvnMcZz2 m8hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ic+8ScIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170902d58700b001586190b7c1si16248456plh.528.2022.08.10.18.59.26; Wed, 10 Aug 2022 18:59:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ic+8ScIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233090AbiHKBlR (ORCPT + 99 others); Wed, 10 Aug 2022 21:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbiHKBlP (ORCPT ); Wed, 10 Aug 2022 21:41:15 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2C5B844FE; Wed, 10 Aug 2022 18:41:12 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id h132so15888998pgc.10; Wed, 10 Aug 2022 18:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=F6hxhK/CjlN1f5v5Y2g2kDzYo8Q8zwKdylN6nrbEMvU=; b=ic+8ScICKjjbdXIQQQmthij281I3mSRMks3Wz+5PmPGiGjve/0Mhj6uJHW1C1OjV49 5dhtxWSiJpNuJ4+u/PT+J4y0S29qrn/kl6QgtlDQtaFaKNXFfotD9Y5odxIsOYNxDM5l J7R41PfhBLdPrayfFvDdBVB2MYqh8S4DudkAVWtJcxktwa8nBrRGTaxtOaLgXThhd/hV Fi3Ef7T557Gx2t5tXOK/JCsboXGvZOuhthyyJj0lUtoFz9uUHYAmV+HwtDZ1Bs36IA+C d4R6msDSug80BQWdnojMkESuKlA0YuJAsUSJEHSAKYUFcTLZ1xbmb9xE7YFBAvkN5+VW H3nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=F6hxhK/CjlN1f5v5Y2g2kDzYo8Q8zwKdylN6nrbEMvU=; b=ysum7JKUjl8pQMG+jD4rqBPW8Cjvf0WYGXJgAHuSK/dHY0lp9VtP+TpMbcdsCOf9XC bJzfUJZnwkkHnasDqaoBj/PDSbQrptJJiETA54speZ+bKHf3FKb2V/52M2CgG6h+gSYS HUieZ42CZu1AKughuUFmN6zU9hIYLprHUEhGwZQIcju/4DTTK/tBrUyCj1c0SyXk6Qmm UIZMUVpJigGxeb3bA17a6bhyrYEbSe9cS03FtvxO7ddP8PRRxIKz3770Yu19o9jviMek yLuxG64p4qZd3Lb8hOky3DDAi7xEjjJ3NfgpaPFsUX5HLsZjFb8Qf12eG/RMNDHQZj7I Dz4A== X-Gm-Message-State: ACgBeo3FQy1rebjH5eR5tqmXNBnMgvhrXi2WPJ2JJ6AacHE5C2TrhcBc K/50VeOKIDguEr6v0phgNds= X-Received: by 2002:a63:8ac3:0:b0:41b:ba48:e3f6 with SMTP id y186-20020a638ac3000000b0041bba48e3f6mr24089927pgd.567.1660182072334; Wed, 10 Aug 2022 18:41:12 -0700 (PDT) Received: from Laptop-X1 ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id b17-20020a621b11000000b0052da33fe7d2sm2818830pfb.95.2022.08.10.18.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 18:41:11 -0700 (PDT) Date: Thu, 11 Aug 2022 09:41:03 +0800 From: Hangbin Liu To: Siddh Raman Pant Cc: Piyush Thange , davem , edumazet , kuba , pabeni , shuah , "vladimir.oltean" , idosch , petrm , troglobit , amcohen , tobias , "po-hsu.lin" , netdev , linux-kselftest , linux-kernel , linux-kernel-mentees Subject: Re: [PATCH] selftests:net:forwarding: Included install command Message-ID: References: <20220810093508.33790-1-pthange19@gmail.com> <182872c2de1.4461d55242061.8862004854197621952@siddh.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <182872c2de1.4461d55242061.8862004854197621952@siddh.me> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 10, 2022 at 03:23:15PM +0530, Siddh Raman Pant wrote: > On Wed, 10 Aug 2022 15:05:08 +0530 Piyush Thange wrote: > > If the execution is skipped due to "jq not installed" message then > > the installation methods on different OS's have been provided with > > this message. > > > > Signed-off-by: Piyush Thange > > --- > > tools/testing/selftests/net/forwarding/lib.sh | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh > > index 37ae49d47853..c4121856fe06 100755 > > --- a/tools/testing/selftests/net/forwarding/lib.sh > > +++ b/tools/testing/selftests/net/forwarding/lib.sh > > @@ -152,6 +152,14 @@ require_command() > > > > if [[ ! -x "$(command -v "$cmd")" ]]; then > > echo "SKIP: $cmd not installed" > > + if [[ $cmd == "jq" ]]; then > > + echo " Install on Debian based systems" > > + echo " sudo apt -y install jq" > > + echo " Install on RHEL based systems" > > + echo " sudo yum -y install jq" > > + echo " Install on Fedora based systems" > > + echo " sudo dnf -y install jq" > > + fi > > exit $ksft_skip > > fi > > } > > -- > > 2.37.1 > > This is very specific to `jq` command. What's special with `jq` and not > others? If methods have to be shown, they should be shown for all the > programs which are not installed. Agree. The user could decide if jq should be install via REQUIRE_JQ. There are also other cmds that vendor may not build by default. I didn't see any selftests need to handle the installation. The users should takes care of it. require_command() has takes care most of the needed cmds. If we want to improve the user's experience for the needed cmds. I think add the needed cmds to README file is better. Thanks Hangbin