diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-06-24 18:36:41 -0700 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-06-27 12:05:01 +0200 |
commit | 436352e8e57e219aae83d28568d9bd9857311e5a (patch) | |
tree | c694431342f67f27ae42bc23265e7a60f3aa0e1c /tools/testing/selftests/net/psock_snd.sh | |
parent | 36893ef0b661671ee64eb37bf5f345f33d2cabb7 (diff) | |
download | lwn-436352e8e57e219aae83d28568d9bd9857311e5a.tar.gz lwn-436352e8e57e219aae83d28568d9bd9857311e5a.zip |
selftest: af_unix: Add SO_OOBINLINE test cases in msg_oob.c
When SO_OOBINLINE is enabled on a socket, MSG_OOB can be recv()ed
without MSG_OOB flag, and ioctl(SIOCATMARK) will behaves differently.
This patch adds some test cases for SO_OOBINLINE.
Note the new test cases found two bugs in TCP.
1) After reading OOB data with non-inline mode, we can re-read
the data by setting SO_OOBINLINE.
# RUN msg_oob.no_peek.inline_oob_ahead_break ...
# msg_oob.c:146:inline_oob_ahead_break:AF_UNIX :world
# msg_oob.c:147:inline_oob_ahead_break:TCP :oworld
# OK msg_oob.no_peek.inline_oob_ahead_break
ok 14 msg_oob.no_peek.inline_oob_ahead_break
2) The head OOB data is dropped if SO_OOBINLINE is disabled
if a new OOB data is queued.
# RUN msg_oob.no_peek.inline_ex_oob_drop ...
# msg_oob.c:171:inline_ex_oob_drop:AF_UNIX :x
# msg_oob.c:172:inline_ex_oob_drop:TCP :y
# msg_oob.c:146:inline_ex_oob_drop:AF_UNIX :y
# msg_oob.c:147:inline_ex_oob_drop:TCP :Resource temporarily unavailable
# OK msg_oob.no_peek.inline_ex_oob_drop
ok 17 msg_oob.no_peek.inline_ex_oob_drop
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/selftests/net/psock_snd.sh')
0 files changed, 0 insertions, 0 deletions