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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+FuTSevYage147cqyogSfvZN5gtqKngP3RNQe0UoawgtQQ-xA@mail.gmail.com>
Date:   Wed, 18 Nov 2020 16:43:33 -0500
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Antonio Cardace <acardace@...hat.com>,
        Network Development <netdev@...r.kernel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Michal Kubecek <mkubecek@...e.cz>
Subject: Re: [PATCH net-next v3 4/4] selftests: add ring and coalesce selftests

On Tue, Nov 17, 2020 at 12:19 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Tue, 17 Nov 2020 12:32:36 +0100 Antonio Cardace wrote:
> > On Mon, Nov 16, 2020 at 04:45:03PM -0800, Jakub Kicinski wrote:
> > > On Sat, 14 Nov 2020 00:16:55 +0100 Antonio Cardace wrote:
> > > > Add scripts to test ring and coalesce settings
> > > > of netdevsim.
> > > >
> > > > Signed-off-by: Antonio Cardace <acardace@...hat.com>
> > >
> > > > @@ -0,0 +1,68 @@
> > > > +#!/bin/bash
> > > > +# SPDX-License-Identifier: GPL-2.0-only
> > > > +
> > > > +source ethtool-common.sh
> > > > +
> > > > +function get_value {
> > > > +    local key=$1
> > > > +
> > > > +    echo $(ethtool -c $NSIM_NETDEV | \
> > > > +        awk -F':' -v pattern="$key:" '$0 ~ pattern {gsub(/[ \t]/, "", $2); print $2}')
> > > > +}
> > > > +
> > > > +if ! ethtool -h | grep -q coalesce; then
> > > > +    echo "SKIP: No --coalesce support in ethtool"
> > > > +    exit 4
> > >
> > > I think the skip exit code for selftests is 2
> > In the ethtool-pause.sh selftest the exit code is 4 (I copied it from
> > there), should I change that too?
>
> Sorry I misremembered it's 4. We can leave that as is.

Instead of having to remember, maybe we should have a file in
tools/testing/selftest to define constants?

I defined them one-off in tools/testing/selftests/net/udpgso_bench.sh

readonly KSFT_PASS=0
readonly KSFT_FAIL=1
readonly KSFT_SKIP=4

along with some other kselftest shell support infra. But having each
test figure this out independently is duplicative and error prone.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ