[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7B657CC7-B5CA-46D2-8A4B-8AB5FB83C6DA@gmail.com>
Date: Tue, 18 Nov 2025 07:09:56 +0800
From: Miao Wang <shankerwangmiao@...il.com>
To: Kuniyuki Iwashima <kuniyu@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Aaron Conole <aconole@...heb.org>,
Kuniyuki Iwashima <kuni1840@...il.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH v1 net 2/2] selftest: af_unix: Add test for SO_PEEK_OFF.
> 2025年11月18日 01:47,Kuniyuki Iwashima <kuniyu@...gle.com> 写道:
>
> The test covers various cases to verify SO_PEEK_OFF behaviour
> for all AF_UNIX socket types.
>
> two_chunks_blocking and two_chunks_overlap_blocking reproduce
> the issue mentioned in the previous patch.
>
> Without the patch, the two tests fail:
>
> # RUN so_peek_off.stream.two_chunks_blocking ...
> # so_peek_off.c:121:two_chunks_blocking:Expected 'bbbb' == 'aaaabbbb'.
> # two_chunks_blocking: Test terminated by assertion
> # FAIL so_peek_off.stream.two_chunks_blocking
> not ok 3 so_peek_off.stream.two_chunks_blocking
>
> # RUN so_peek_off.stream.two_chunks_overlap_blocking ...
> # so_peek_off.c:159:two_chunks_overlap_blocking:Expected 'bbbb' == 'aaaabbbb'.
> # two_chunks_overlap_blocking: Test terminated by assertion
> # FAIL so_peek_off.stream.two_chunks_overlap_blocking
> not ok 5 so_peek_off.stream.two_chunks_overlap_blocking
>
> With the patch, all tests pass:
>
> # PASSED: 15 / 15 tests passed.
> # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...gle.com>
> ---
> tools/testing/selftests/net/.gitignore | 1 +
> tools/testing/selftests/net/af_unix/Makefile | 1 +
> .../selftests/net/af_unix/so_peek_off.c | 162 ++++++++++++++++++
> 3 files changed, 164 insertions(+)
> create mode 100644 tools/testing/selftests/net/af_unix/so_peek_off.c
>
Hi,
Many thanks for your patch. I wonder if at the end of each
test, a normal recv() without MGS_PEEK can be called to check
if it can receive all the content in the receiving buffer and
check if SO_PEEK_OFF becomes back to zero.
Cheers,
Miao Wang
Powered by blists - more mailing lists