lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 9 Feb 2021 07:41:28 +0100
From:   Björn Töpel <bjorn.topel@...el.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>,
        Björn Töpel <bjorn.topel@...il.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        u9012063@...il.com, Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH bpf v2] selftests/bpf: remove bash feature in
 test_xdp_redirect.sh

On 2021-02-09 06:52, Andrii Nakryiko wrote:
> On Sat, Feb 6, 2021 at 1:29 AM Björn Töpel <bjorn.topel@...il.com> wrote:
>>
>> From: Björn Töpel <bjorn.topel@...el.com>
>>
>> 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
> [<first command>] && [<second command>] check and leave set -e intact.
>

Ok!

Please decide on the shell flavor, and I'll respin a v3.


Björn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ