]> git.ipfire.org Git - thirdparty/linux.git/commit
selftest: af_unix: Add test for SO_INQ.
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 2 Jul 2025 22:35:19 +0000 (22:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Jul 2025 01:05:26 +0000 (18:05 -0700)
commite0f60ba041a0088a48a5064583e8c36306a8f7e3
treea7408f5361ad08f71f135cfe0fb1bc21f3351422
parentdf30285b3670bf52e1e5512e4d4482bec5e93c16
selftest: af_unix: Add test for SO_INQ.

Let's add a simple test to check the basic functionality of SO_INQ.

The test does the following:

  1. Create socketpair in self->fd[]
  2. Enable SO_INQ
  3. Send data via self->fd[0]
  4. Receive data from self->fd[1]
  5. Compare the SCM_INQ cmsg with ioctl(SIOCINQ)

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250702223606.1054680-8-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/.gitignore
tools/testing/selftests/net/af_unix/Makefile
tools/testing/selftests/net/af_unix/scm_inq.c [new file with mode: 0644]