Re: [PATCH net-next RFC] selftests/net: integrate packetdrill with ksft

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Kicinski wrote:
> On Mon, 2 Sep 2024 09:46:12 -0700 Jakub Kicinski wrote:
> > PRESERVE_TEST_DIRS
> 
> This was meant to be:
> 
> PRESERVE_TEST_DIRS := 1

Oh I like this.

> Testing this more, looks like rsync -aR breaks networking tests, too.
> The net/lib target, specifically, is no longer able to copy out 
> the files outside of tools/testing/selftests (the YAML specs which
> live in Documentation/).
> 
> So unless we can pass some magic flag to rsync to skip leading ../
> we'll be stuck in supporting both behaviors forever. In which case
> maybe TEST_PROGS_RECURSE is indeed better. I was hoping the
> PRESERVE_TEST_DIRS flag can spread and once it reaches all targets
> we can make delete the old behavior. If it can't happen its no better
> than TEST_PROGS_RECURSE... sorry for the noise.

Oh right :/ 

A lot of TEST(_GEN|_CUSTOM)_PROGS(_EXTENDED) could probably be cleaned
up.

One part that I haven't looked at closely yet is x86's Makefile
prefixing everything with $(OUTPUT). That seems something that should
be consistent across target Makefiles if it exists at all, but
clearly isn't. Maybe it was when it was introduced in commit
a8ba798bc8ec.

So, we could opt out only TEST_FILES. But that still leaves a
branch there indefinitely and makes the option harder to understand.
Sounds like TEST_PROGS_RECURSE is simpler then, indeed.


Separate from the above, runner.sh also needs a few changes. This
part is mostly cosmetic, but there will be duplicate basenames,
for common terms such as client.pkt
 
-       TEST_HDR_MSG="selftests: $DIR: $BASENAME_TEST"
+       TEST_HDR_MSG="selftests: $DIR: $TEST"

run_in_netns and run_many need similar fixes to avoid name collisions.


Btw, for KSELFTEST_PKT_INTERP it probably makes sense to only try this
if the script is non-executable, similar to the existing opt-out that
looks at the shebang.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux