We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
CMSG_NXTHDR
1 parent 2782869 commit befc34bCopy full SHA for befc34b
1 file changed
libc-test/tests/cmsg.rs
@@ -75,6 +75,7 @@ mod t {
75
for cmsg_payload_len in 0..64 {
76
let mut current_cmsghdr_ptr = pcmsghdr;
77
assert!(!current_cmsghdr_ptr.is_null());
78
+ let mut count = 0;
79
80
// Go from first cmsghdr to the last (until null) using various
81
// cmsg_len increments. `cmsg_len` is set by us to check that
@@ -87,9 +88,14 @@ mod t {
87
88
89
let libc_next = libc::CMSG_NXTHDR(&mhdr, current_cmsghdr_ptr);
90
let system_next = cmsg_nxthdr(&mhdr, current_cmsghdr_ptr);
- assert_eq!(libc_next, system_next);
91
+ assert_eq!(
92
+ system_next, libc_next,
93
+ "msg_crontrollen: {}, payload_len: {}, count: {}",
94
+ mhdr.msg_controllen, cmsg_payload_len, count
95
+ );
96
97
current_cmsghdr_ptr = libc_next;
98
+ count += 1;
99
}
100
101
0 commit comments