From 904b94c07af84b7e4c98de3bbb822ccffcaf8c40 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 23 Apr 2023 19:05:48 +0300 Subject: socket: Add a test for MSG_CMSG_CLOEXEC This checks that: * We can send and receive fds over Unix domain sockets using SCM_RIGHTS; * msg_controllen, cmsg_level, cmsg_type, cmsg_len are all filled in correctly on receive; * Most importantly, the received fd has or has not the close-on-exec flag set depending on whether we pass MSG_CMSG_CLOEXEC to recvmsg (). Checked on i686-gnu and x86_64-linux-gnu. Reviewed-by: Adhemerval Zanella Signed-off-by: Sergey Bugaev Message-Id: <20230423160548.126576-4-bugaevc@gmail.com> --- socket/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'socket/Makefile') diff --git a/socket/Makefile b/socket/Makefile index fffed7dd82..94951ae3e7 100644 --- a/socket/Makefile +++ b/socket/Makefile @@ -35,6 +35,7 @@ tests := \ tst-accept4 \ tst-sockopt \ tst-cmsghdr \ + tst-cmsg_cloexec \ # tests tests-internal := \ -- cgit 1.4.1