Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v7 0/2] selftests: net: veth: propagate check failures to exit status
@ 2026-11-24 21:40 Omokefe Emmanuel Onanaroghene
  2026-11-24 21:40 ` [PATCH net-next v7 1/2] selftests: net: veth: derive invalid-tx test value from kernel max Omokefe Emmanuel Onanaroghene
  2026-11-24 21:40 ` [PATCH net-next v7 2/2] selftests: net: veth: propagate check failures to exit status Omokefe Emmanuel Onanaroghene
  0 siblings, 2 replies; 3+ messages in thread
From: Omokefe Emmanuel Onanaroghene @ 2026-11-24 21:40 UTC (permalink / raw)
  To: tianyi, hangbin.liu
  Cc: kuba, netdev, linux-kselftest, linux-kernel, bpf, davem, edumazet,
	pabeni, horms, shuah, ast, daniel, hawk, john.fastabend, sdf,
	skhan, kernel-team, tianyi.gao, Omokefe Emmanuel Onanaroghene

Four checks in tools/testing/selftests/net/veth.sh report failures
without setting ret, allowing the script to exit 0 even when a check
fails. Set ret=1 in chk_channels() and the three "bad setting"
negative tests identified by Tianyi during review of v2.

Patch 1 fixes the invalid TX channel test, which used nproc + 1
to determine an out-of-range value. However, nproc can be lower
than num_possible_cpus() when CPU affinity or cpusets restrict
a process, meaning the kernel may accept the requested queue count.
This could cause false failures on a correctly functioning
kernel once the propagation patch makes failures honest.

Use the kernel-reported max_tx + 1 instead, ensuring the
attempted value always exceeds the device's supported maximum.
Spotted by Sashiko AI review of v2.

---
v7:
  - Fix [1/2] subject numbering, lost in v6's send
v6: https://lore.kernel.org/all/20261124211645.5751-1-emmaonana18@gmail.com/
  - Squash the two propagation patches into one  and add
    Tianyi's tags.
v5: https://lore.kernel.org/all/20261121182217.4609-1-emmaonana18@gmail.com/
  - Retarget to net-next and drop the Fixes tags
  - Move the invalid-tx fix first, so no commit in the series can
    report a false failure on a correct kernel.
  - Fix the subject prefix on the invalid-tx patch, lost in v4's
    send.
v4: https://lore.kernel.org/all/20261119003003.40482-1-emmaonana18@gmail.com/
  - Patch 2: use if/else instead of "&& { ...; } ||" chains, keep
    lines within 80 columns (thanks Tianyi for the review).
  - Add patch 3 deriving the invalid tx value from the kernel maximum.
v3: https://lore.kernel.org/all/20261116084107.6675-1-emmaonana18@gmail.com/
  - Add Tianyi Gao's Tested-by to patch 1 (thanks!).
  - Add patch 2 fixing the remaining three checks.
v2: https://lore.kernel.org/all/20261115214702.50817-1-emmaonana18@gmail.com/
  - Correct Fixes tag to 1ec2230fc721.
v1: https://lore.kernel.org/all/20261115212117.48496-1-emmaonana18@gmail.com/
  - Initial posting.

Omokefe Emmanuel Onanaroghene (2):
  selftests: net: veth: derive invalid-tx test value from kernel max
  selftests: net: veth: propagate check failures to exit status

 tools/testing/selftests/net/veth.sh | 31 +++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

-- 
2.43.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-24 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 21:40 [PATCH net-next v7 0/2] selftests: net: veth: propagate check failures to exit status Omokefe Emmanuel Onanaroghene
2026-11-24 21:40 ` [PATCH net-next v7 1/2] selftests: net: veth: derive invalid-tx test value from kernel max Omokefe Emmanuel Onanaroghene
2026-11-24 21:40 ` [PATCH net-next v7 2/2] selftests: net: veth: propagate check failures to exit status Omokefe Emmanuel Onanaroghene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox