On Fri, May 08, 2026 at 08:03:11AM -0700, Stanislav Fomichev wrote: > On 05/07, Bobby Eshleman wrote: > > From: Bobby Eshleman <[email protected]> > > > > Adding netkit-based devmem tests is a straight-forward copy of devmem > > test commands plus some args for the nk cases, so this patch breaks out > > these command builders into helpers used by both. > > > > Though we tried to avoid libraries to avoid increasing the barrier of > > entry/complexity (see selftests/drivers/net/README.md, section "Avoid > > libraries and frameworks"), factoring out these functions seemed like > > the lesser of two evils in this case of using the same commands, just > > with slightly different args per environment. > > > > I experimented with just having all of the tests in the same file to > > avoid having helpers in a library file, but because ksft_run() is > > limited to a single call per file, and the new tests will require > > different environments (NetDrvContEnv/NetDrvEpEnv), it would have been > > necessary to have each test set up its own environment instead of > > sharing one for the entire ksft_run() run. This came at the cost of > > ballooning the test time (from under 5s to 30s on my test system), so to > > strike a balance these tests were placed in separate files so they could > > keep a shared environment across a single ksft_run() run shared across > > all tests using the same env type (introduced in subsequent patches). > > > > The helpers work transparently with both plain and netkit environments > > by inspecting cfg for netkit-specific attributes (netns, nk_queue, > > etc...). > > > > Signed-off-by: Bobby Eshleman <[email protected]> > > --- > > [..] > > > Changes in v4: > > This is a v3, but you already have changes for v4 :-p
oops, will change on respin. Thanks, Bobby

