Re: [PATCH net-next 2/2] selftests: net: improve error handling in passive TFO test

From: Yohei Kojima

Date: Tue Jan 13 2026 - 09:22:19 EST


On Tue, Jan 13, 2026 at 10:46:10AM +0100, Markus Elfring wrote:
> > This commit improves the error handling in passive TFO test to check the
> > return value from … and to fail if read() failed.
>
> Would any developers and system testers like to care more also for data output failures?
> https://elixir.bootlin.com/linux/v6.19-rc4/source/tools/testing/selftests/net/tfo.c#L86-L88
> https://cwe.mitre.org/data/definitions/252.html

That's right. Although we can assume that fprintf() usually succeeds,
it worth checking its return value as tfo_passive.sh relies on the
content of the output.

I posted the v2 series adding fprintf() error handling here:
https://lore.kernel.org/netdev/cover.1768312014.git.yk@xxxxxxxxx/

Thank you,
Yohei

>
> Regards,
> Markus