af_unix: Add test for consecutive consumed OOB.
authorKuniyuki Iwashima <kuniyu@google.com>
Thu, 19 Jun 2025 04:13:56 +0000 (21:13 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 24 Jun 2025 08:10:06 +0000 (10:10 +0200)
commite1ca44e85f652a6ebd657c67c394894c1fdfb403
tree6b45ba656df00540cd6414135853ef59d9566e9c
parent32ca245464e1479bfea8592b9db227fdc1641705
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>
tools/testing/selftests/net/af_unix/msg_oob.c