Skip to content

Commit

Permalink
Add a test that passes a CmsgSpace that is too large
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Jul 10, 2018
1 parent 0ca612c commit 386cd04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sys/test_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,12 @@ fn test_impl_scm_credentials_and_rights<T>(mut space: ::nix::sys::socket::CmsgSp
let msg = recvmsg(recv, &iov, Some(&mut space), MsgFlags::empty()).unwrap();
let mut received_cred = None;

assert_eq!(msg.cmsgs().count(), 2);
assert_eq!(msg.cmsgs().count(), 2, "expected 2 cmsgs");

for cmsg in msg.cmsgs() {
match cmsg {
ControlMessage::ScmRights(fds) => {
assert_eq!(received_r, None);
assert_eq!(received_r, None, "already received fd");
assert_eq!(fds.len(), 1);
received_r = Some(fds[0]);
}
Expand Down

0 comments on commit 386cd04

Please sign in to comment.