Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCDE8C433E0 for ; Tue, 9 Feb 2021 06:42:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7878A64E3B for ; Tue, 9 Feb 2021 06:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbhBIGmY (ORCPT ); Tue, 9 Feb 2021 01:42:24 -0500 Received: from mga05.intel.com ([192.55.52.43]:32488 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbhBIGmT (ORCPT ); Tue, 9 Feb 2021 01:42:19 -0500 IronPort-SDR: bUynXjoAkDgwLiy5wwhJuCE7yqnuTHfRXjQcQmf47E2LN9z8j+qyaOYPzZifFV55Af0AVfoZoJ C6Jau+fam5RA== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="266670678" X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="266670678" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 22:41:38 -0800 IronPort-SDR: N4CjeIMs8sr1M1kRZLtyhmAv1Nwro6Q/3NPEpl9ZUNTqm+y9vz749RvpKjzTvJipkTfIVevbx5 748fziOCg/7w== X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="395976473" Received: from ebirent-mobl1.ccr.corp.intel.com (HELO btopel-mobl.ger.intel.com) ([10.249.47.82]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 22:41:32 -0800 Subject: Re: [PATCH bpf v2] selftests/bpf: remove bash feature in test_xdp_redirect.sh To: Andrii Nakryiko , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Alexei Starovoitov , Daniel Borkmann , Networking , bpf , u9012063@gmail.com, Randy Dunlap References: <20210206092654.155239-1-bjorn.topel@gmail.com> From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Message-ID: Date: Tue, 9 Feb 2021 07:41:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2021-02-09 06:52, Andrii Nakryiko wrote: > On Sat, Feb 6, 2021 at 1:29 AM Björn Töpel wrote: >> >> From: Björn Töpel >> >> The test_xdp_redirect.sh script uses a bash redirect feature, >> '&>/dev/null'. Use '>/dev/null 2>&1' instead. > > We have plenty of explicit bash uses in selftest scripts, I'm not sure > it's a good idea to make scripts more verbose. > $ cd tools/testing/selftests $ git grep '\#!/bin/bash'|wc -l 282 $ git grep '\#!/bin/sh'|wc -l 164 Andrii/Randy, I'm fine with whatever. I just want to be able to run the test on Debian-derived systems. ;-) >> >> Also remove the 'set -e' since the script actually relies on that the >> return value can be used to determine pass/fail of the test. > > This sounds like a dubious decision. The script checks return results > only of last two commands, for which it's better to write and if > [] && [] check and leave set -e intact. > Ok! Please decide on the shell flavor, and I'll respin a v3. Björn