• Kuniyuki Iwashima's avatar
    selftest: af_unix: Add non-TCP-compliant test cases in msg_oob.c. · f5ea0768
    Kuniyuki Iwashima authored
    While testing, I found some weird behaviour on the TCP side as well.
    
    For example, TCP drops the preceding OOB data when queueing a new
    OOB data if the old OOB data is at the head of recvq.
    
      #  RUN           msg_oob.no_peek.ex_oob_drop ...
      # msg_oob.c:146:ex_oob_drop:AF_UNIX :x
      # msg_oob.c:147:ex_oob_drop:TCP     :Resource temporarily unavailable
      # msg_oob.c:146:ex_oob_drop:AF_UNIX :y
      # msg_oob.c:147:ex_oob_drop:TCP     :Invalid argument
      #            OK  msg_oob.no_peek.ex_oob_drop
      ok 9 msg_oob.no_peek.ex_oob_drop
    
      #  RUN           msg_oob.no_peek.ex_oob_drop_2 ...
      # msg_oob.c:146:ex_oob_drop_2:AF_UNIX :x
      # msg_oob.c:147:ex_oob_drop_2:TCP     :Resource temporarily unavailable
      #            OK  msg_oob.no_peek.ex_oob_drop_2
      ok 10 msg_oob.no_peek.ex_oob_drop_2
    
    This patch allows AF_UNIX's MSG_OOB implementation to produce different
    results from TCP when operations are guarded with tcp_incompliant{}.
    Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    f5ea0768
msg_oob.c 6.25 KB