Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6897639rwb; Wed, 10 Aug 2022 03:11:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR4yL6PFd7aGfZ4LkKhQW0wk3G6Wno1UksoO49aeOHI7Sc62A+Jjo5h2y+CQiEF0a+isKjRn X-Received: by 2002:a17:907:6890:b0:731:41a9:bb03 with SMTP id qy16-20020a170907689000b0073141a9bb03mr11144663ejc.302.1660126265741; Wed, 10 Aug 2022 03:11:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660126265; cv=pass; d=google.com; s=arc-20160816; b=vvh+3+lnajmRxLNHXXv9Vfkg+vw/jRvqc9cjb/QLpd1xTT98hW2mYs8eIu62rrHpgP PzoyO6dq7TCSZOKWcgVXdCYx1gCbDos6YTUFsSauCLFh6WmKD7CrVpURXt9PpFmdu9EB L+7psprldNvcMXuyhvM2HIzggmtnlOSs3cfB5hbKjqh09n7laom0JnrOY5MdtvjUPdqx 146+oNGF3484W4A4xX7ho4jUExgLzfUEzX3fiNSUXv+XPND5yZv3oM2wOCzlh37DmRy4 NQ2kp0qk0VKT06UcEf9F8OOHSMOuj2NLQT2PmWp6T4OdyJ0f+WWmyq8mimc+MD3rCE3u zDKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=jFHeqsb5u9GbFqhnxEh8/I0ZWgirYI4r/VF0zXwQCKg=; b=C5t3D6T9hBMWH9MO3s/+B/AIpvWKQPbeamS7zL2in/g+DiEVUtXyl0hhrtdNO1n3af aXyRBDRLCr8pSX3FisDP0AOTfRm5Mg4/WEEGJ2gughGAkBEHFQtoY6Zq3nU9WXFr5Oz6 Zur4C9YAcybs1vTbN3hJEDYZ7N0j6yiLRbfJd4F7eWQLsXxt/zR4D8vCORGv/OCY9X+C nECxKzTDbW9An5S7tko1R5+buXAD1HVRx3KddoayJ8sEXzwBabIkwVJWP3VqxQgj1pQA gGs2fZtPIkJiNVIdamTtI1Yn178LNpP5ZqsyPm8AhlwEum7dg4gF+YJvKbUYpsO/SYYl fB8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b="EO6t/NXZ"; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a170906111500b0072b66c5cdf0si3449549eja.481.2022.08.10.03.10.40; Wed, 10 Aug 2022 03:11:05 -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=@siddh.me header.s=zmail header.b="EO6t/NXZ"; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231318AbiHJJyY (ORCPT + 99 others); Wed, 10 Aug 2022 05:54:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbiHJJyX (ORCPT ); Wed, 10 Aug 2022 05:54:23 -0400 Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92F5A6D555; Wed, 10 Aug 2022 02:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660125207; cv=none; d=zohomail.in; s=zohoarc; b=UblMjqw8qmPYogTQo3ltSXOQI+8glvR4lqIxjVk9CzooC8iZYsOgp40duR8QENbGEW40NR0sowLV5c0W9DYuSO+pu3d7pwwHdzxFPTfI89v9AYHUrDFUdMnRC8CcwgDbx23R9fYrba6Elf/JRCjHWWJZM4wRVr3GyuSe7vf6NqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1660125207; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=jFHeqsb5u9GbFqhnxEh8/I0ZWgirYI4r/VF0zXwQCKg=; b=Y45gDrz/+voF4praet59up2VOlOoGeXzgZ1/SGYannQc77KA7wAOT5YxVU+Rd9OvlifALZMlkuJjFg8WR0bqDqJw9HKYbHPHa8Jq4VO3YAOkhCwawCAQvJ0A01xNcB8NreI18yUGdfHhTve7Q1N9nOy33LKNCXRf3okVMO1i1Mw= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1660125207; s=zmail; d=siddh.me; i=code@siddh.me; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=jFHeqsb5u9GbFqhnxEh8/I0ZWgirYI4r/VF0zXwQCKg=; b=EO6t/NXZcel9fZsbNJY0cIuSsZPbL5sJaTI4e5p6BpXc38Zv6a95Dr850rfR4QLl 9ychbWnlk/OBS3tjW9tHDqWJ2XafJTl25LMDMwBDzx4L53TP5wB1et80vPJ9Av8GJmN bMXBvyywSJwtqzwGd+4jdvk449o11kXMCIzcUrtg= Received: from mail.zoho.in by mx.zoho.in with SMTP id 1660125195772428.3384944175755; Wed, 10 Aug 2022 15:23:15 +0530 (IST) Date: Wed, 10 Aug 2022 15:23:15 +0530 From: Siddh Raman Pant To: "Piyush Thange" Cc: "davem" , "edumazet" , "kuba" , "pabeni" , "shuah" , "vladimir.oltean" , "idosch" , "petrm" , "troglobit" , "amcohen" , "tobias" , "po-hsu.lin" , "netdev" , "linux-kselftest" , "linux-kernel" , "linux-kernel-mentees" Message-ID: <182872c2de1.4461d55242061.8862004854197621952@siddh.me> In-Reply-To: <20220810093508.33790-1-pthange19@gmail.com> References: <20220810093508.33790-1-pthange19@gmail.com> Subject: Re: [PATCH] selftests:net:forwarding: Included install command MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_RED 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, 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. Further, this limits the information to specific package managers and systems in the userspace. Tomorrow a new system may come, which will cause this list to grow, not to mention other existing package managers. The kernel also doesn't have a role in it, so we should try to be generic as much as possible. Thanks, Siddh