Re: [PATCH net-next v3] selftests: net: add tests for the QRTR socket family

From: Murali Krishna

Date: Thu Dec 03 2026 - 09:21:40 EST


On Thu, Dec 03, 2026 at 12:48:22PM +0000, netdev-bot+sashiko@xxxxxxxxxx wrote:
> - [Medium] qrtr_endpoint.c gives the fake /dev/qrtr-tun endpoint the
> fixed node id TEST_SRC_NODE = 5.

Agreed. qrtr_node_assign() gives the tun endpoint the id even when
another node already has it, so a small fixed id can be taken for a
real remote processor on a Qualcomm board. v4 still has this; v5 will
use 0xfff0, near the top of the 16-bit v2 node field.

> - [Medium] qrtr.sh passes on only the binaries' failure status, so it
> exits 0 (PASS) whenever nothing actually runs

Fixed in v4: if no test passes and none fails, qrtr.sh now exits
with the kselftest skip code.

> - [Medium] The commit message says the suite covers the CAP_NET_ADMIN
> boundary, but bind_privileged_port in qrtr_sock.c does not test it

Fixed in v4: the test drops CAP_NET_ADMIN itself, so a single run as
root checks both sides: with it, binding a low port succeeds; without
it, binding the port just below the ephemeral range fails with EACCES.
v5 also checks that the first port of the range is not refused
without it, and only trusts capget() in the initial user namespace,
since capable() checks that one.

> - [Medium] The qrtr_endpoint.c header comment (lines 11-12) and the
> commit message say each frame is malformed in exactly one way

Fixed in v4: zero_size and unaligned_length now fail only the check
they are named for, and the comments say which checks cannot be
tested on their own. In v5, size_exceeds_frame uses a frame that only
the size check rejects when size_t is 32-bit.

> - [Low] Since commit 3b536db8fb32, qrtr_create() in net/qrtr/af_qrtr.c
> returns -EAFNOSUPPORT for any network namespace other than init_net

Right. v5 mentions init_net in the skip messages and in the comment.
qrtr.sh does not need to detect it: as root outside init_net,
qrtr_endpoint still runs the tests that need no socket, and a run
where no test passes or fails is reported as a skip.

v4: https://lore.kernel.org/r/20261203122145.144381-1-muralikrishna2444b@xxxxxxxxx

pw-bot: cr