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:   Thu, 16 Mar 2023 12:10:12 +0100
From:   Petr Machata <petrm@...dia.com>
To:     Petr Machata <petrm@...dia.com>
CC:     Vladimir Oltean <vladimir.oltean@....com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Michal Kubecek <mkubecek@...e.cz>,
        "Vinicius Costa Gomes" <vinicius.gomes@...el.com>,
        Xiaoliang Yang <xiaoliang.yang_1@....com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Rui Sousa <rui.sousa@....com>,
        Ferenc Fejes <ferenc.fejes@...csson.com>,
        "Pranavi Somisetty" <pranavi.somisetty@....com>,
        Harini Katakam <harini.katakam@....com>,
        <UNGLinuxDriver@...rochip.com>, Ido Schimmel <idosch@...dia.com>,
        Aaron Conole <aconole@...hat.com>
Subject: Re: [RFC PATCH net-next] selftests: forwarding: add a test for MAC
 Merge layer


Petr Machata <petrm@...dia.com> writes:

> Vladimir Oltean <vladimir.oltean@....com> writes:
>
>> Hi Petr,
>>
>> On Mon, Feb 13, 2023 at 11:51:37AM +0100, Petr Machata wrote:
>>> Vladimir Oltean <vladimir.oltean@....com> writes:
>>> 
>>> > +# Borrowed from mlxsw/qos_lib.sh, message adapted.
>>> > +bail_on_lldpad()
>>> > +{
>>> > +	if systemctl is-active --quiet lldpad; then
>>> > +		cat >/dev/stderr <<-EOF
>>> > +		WARNING: lldpad is running
>>> > +
>>> > +			lldpad will likely autoconfigure the MAC Merge layer,
>>> > +			while this test will configure it manually. One of them
>>> > +			is arbitrarily going to overwrite the other. That will
>>> > +			cause spurious failures (or, unlikely, passes) of this
>>> > +			test.
>>> > +		EOF
>>> > +		exit 1
>>> > +	fi
>>> > +}
>>> 
>>> This would be good to have unified. Can you make the function reusable,
>>> with a generic or parametrized message? I should be able to carve a bit
>>> of time later to move it to lib.sh, migrate the mlxsw selftests, and
>>> drop the qos_lib.sh copy.
>>
>> Maybe like this?
>
> Yes, for most of them, but the issue is that...
>
>> diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh
>> index c6ce0b448bf3..bf57400e14ee 100755
>> --- a/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh
>> +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh
>> @@ -2,7 +2,7 @@
>>  # SPDX-License-Identifier: GPL-2.0
>>  
>>  source qos_lib.sh
>> -bail_on_lldpad
>> +bail_on_lldpad "configure DCB" "configure Qdiscs"
>
> ... lib.sh isn't sourced at this point yet. `source
> $lib_dir/sch_tbf_ets.sh' brings that in later in the file, so the bail
> would need to be below that. But if it is, it won't run until after the
> test, which is useless.
>
> Maybe all it takes is to replace that `source qos_lib.sh' with
> `NUM_NETIFS=0 source $lib_dir/lib.sh', as we do in in_ns(), but I'll
> need to check.
>
> That's why I proposed to do it myself, some of it is fiddly and having a
> switch handy is going to be... um, handy.

Sorry, this completely slipped my ming. I'm looking into it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ