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]
Message-ID: <ZbFkhmEHBSHgJ4d1@d3>
Date: Wed, 24 Jan 2024 14:27:02 -0500
From: Benjamin Poirier <bpoirier@...dia.com>
To: Jay Vosburgh <jay.vosburgh@...onical.com>
Cc: netdev@...r.kernel.org, Shuah Khan <shuah@...nel.org>,
	Jonathan Corbet <corbet@....net>,
	Andy Gospodarek <andy@...yhouse.net>, Andrew Lunn <andrew@...n.ch>,
	Florian Fainelli <f.fainelli@...il.com>,
	Vladimir Oltean <olteanv@...il.com>, Jiri Pirko <jiri@...nulli.us>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Petr Machata <petrm@...dia.com>,
	Danielle Ratson <danieller@...dia.com>,
	Nikolay Aleksandrov <razor@...ckwall.org>,
	Ido Schimmel <idosch@...dia.com>,
	Johannes Nixdorf <jnixdorf-oss@....de>,
	Davide Caratti <dcaratti@...hat.com>,
	Tobias Waldekranz <tobias@...dekranz.com>,
	Zahari Doychev <zdoychev@...linear.com>,
	Hangbin Liu <liuhangbin@...il.com>, linux-kselftest@...r.kernel.org,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next 2/6] selftests: bonding: Add
 net/forwarding/lib.sh to TEST_INCLUDES

On 2024-01-24 10:24 -0800, Jay Vosburgh wrote:
[...]
> >diff --git a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> >index a509ef949dcf..0eb7edfb584c 100644
> >--- a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> >+++ b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> >@@ -28,7 +28,7 @@
> > REQUIRE_MZ=no
> > NUM_NETIFS=0
> > lib_dir=$(dirname "$0")
> >-source ${lib_dir}/net_forwarding_lib.sh
> >+source "$lib_dir"/../../../net/forwarding/lib.sh
> 
> 	Is there a way to pass TEST_INCLUDES via the environment or as a
> parameter, so that it's not necessary to hard code the path name here
> and in the similar cases below?

It think would be possible but I see two issues:

1) Tests can be run in a myriad ways. Some of them (`make run_tests`,
`run_kselftest.sh`) use runner.sh which would be the place to set
environment variables for a test. However it's also possible to run
tests directly:

tools/testing/selftests/drivers/net/bonding# ./dev_addr_lists.sh

In that case, there's nothing to automatically set an environment
variable for the test.

I think that could be addressed, for example by putting the content of
TEST_INCLUDES in a file and having the test read it itself, but ...

2)
As can be seen in the dsa case and in the bonding and team cases after
patch 6, the relationship between the files listed in TEST_INCLUDES and
the files sourced in a test is not 1:1. So automatically sourcing all
files listed in TEST_INCLUDES is not generally applicable.

Given these two points, I'm inclined to stick with the current approach.
What do you think?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ