Skip to content

Commit e060e43

Browse files
q2venPaolo Abeni
authored andcommitted
selftest: af_unix: Make SCM_RIGHTS into OOB data.
scm_rights.c covers various test cases for inflight file descriptors and garbage collector for AF_UNIX sockets. Currently, SCM_RIGHTS messages are sent with 3-bytes string, and it's not good for MSG_OOB cases, as SCM_RIGTS cmsg goes with the first 2-bytes, which is non-OOB data. Let's send SCM_RIGHTS messages with 1-byte character to pack SCM_RIGHTS into OOB data. Signed-off-by: Kuniyuki Iwashima <[email protected]> Signed-off-by: Michal Luczaj <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 041933a commit e060e43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/net/af_unix/scm_rights.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ void __send_fd(struct __test_metadata *_metadata,
197197
const FIXTURE_VARIANT(scm_rights) *variant,
198198
int inflight, int receiver)
199199
{
200-
#define MSG "nop"
201-
#define MSGLEN 3
200+
#define MSG "x"
201+
#define MSGLEN 1
202202
struct {
203203
struct cmsghdr cmsghdr;
204204
int fd[2];

0 commit comments

Comments
 (0)