mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-11 08:50:20 +08:00
af_unix: Add test for consecutive consumed OOB.
Let's add a test case where consecutive concumed OOB skbs stay at the head of the queue. Without the previous patch, ioctl(SIOCATMARK) assertion fails. Before: # RUN msg_oob.no_peek.ex_oob_ex_oob_oob ... # msg_oob.c:305:ex_oob_ex_oob_oob:Expected answ[0] (0) == oob_head (1) # ex_oob_ex_oob_oob: Test terminated by assertion # FAIL msg_oob.no_peek.ex_oob_ex_oob_oob not ok 12 msg_oob.no_peek.ex_oob_ex_oob_oob After: # RUN msg_oob.no_peek.ex_oob_ex_oob_oob ... # OK msg_oob.no_peek.ex_oob_ex_oob_oob ok 12 msg_oob.no_peek.ex_oob_ex_oob_oob Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250619041457.1132791-3-kuni1840@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
32ca245464
commit
e1ca44e85f
@@ -548,6 +548,29 @@ TEST_F(msg_oob, ex_oob_oob)
|
||||
siocatmarkpair(false);
|
||||
}
|
||||
|
||||
TEST_F(msg_oob, ex_oob_ex_oob_oob)
|
||||
{
|
||||
sendpair("x", 1, MSG_OOB);
|
||||
epollpair(true);
|
||||
siocatmarkpair(true);
|
||||
|
||||
recvpair("x", 1, 1, MSG_OOB);
|
||||
epollpair(false);
|
||||
siocatmarkpair(true);
|
||||
|
||||
sendpair("y", 1, MSG_OOB);
|
||||
epollpair(true);
|
||||
siocatmarkpair(true);
|
||||
|
||||
recvpair("y", 1, 1, MSG_OOB);
|
||||
epollpair(false);
|
||||
siocatmarkpair(true);
|
||||
|
||||
sendpair("z", 1, MSG_OOB);
|
||||
epollpair(true);
|
||||
siocatmarkpair(true);
|
||||
}
|
||||
|
||||
TEST_F(msg_oob, ex_oob_ahead_break)
|
||||
{
|
||||
sendpair("hello", 5, MSG_OOB);
|
||||
|
||||
Reference in New Issue
Block a user