Re: [PATCH net v2] selftests/net: test network sysctl extremes

From: Sahaj Chaudhari

Date: Sun Oct 25 2026 - 12:09:28 EST


Hi Hangbin,

Thanks for asking. C was a choice, not a requirement; I agree shell is
clearer for simple sysctl toggles. This test also searches accepted bounds
for each value in a sysctl vector, verifies writes, restores the original
vector, exercises loopback, and checks kernel log records. I chose C to
make the numeric and error handling explicit. My shell prototype was
unreliable in QEMU when parsing the vectors and reading /dev/kmsg; I don't
mean that shell could not be made to handle those cases.

I've narrowed the test to tcp_rmem and tcp_wmem; UDP is now only a
transport smoke check. I recognize the C implementation is sizeable, so
if you think that complexity isn't warranted for this coverage, I'm open
to simplifying or folding the test into an existing one.

Thanks,
Sahaj