Re: [PATCH net-next] selftests: net: socket: fix inverted failure diagnostic
From: Simon Horman
Date: Sat Nov 28 2026 - 10:17:49 EST
On Fri, Nov 20, 2026 at 01:51:02AM +0100, Omokefe Emmanuel Onanaroghene wrote:
> When socket() succeeds but the test case expected failure, the error
> branch prints "expected success got err" with strerror(errno), both
> backwards (reality is "expected err, got success") and stale (errno is
> meaningless after a successful call). Mirror the sibling fd<0 branch:
> name the expected errno via strerror(-s->expect).
>
> Signed-off-by: Omokefe Emmanuel Onanaroghene <emmaonana18@xxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>