Date: Sat, 23 Jan 2016 22:19:17 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-testing@freebsd.org Subject: [Bug 206543] tools/regression/sockets/unix_cmsg:t_cmsg_len doesn't pass on 64-bit archs; likely passes on 32-bit archs by accident Message-ID: <bug-206543-32464@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206543 Bug ID: 206543 Summary: tools/regression/sockets/unix_cmsg:t_cmsg_len doesn't pass on 64-bit archs; likely passes on 32-bit archs by accident Product: Base System Version: 10.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: tests Assignee: freebsd-testing@freebsd.org Reporter: ngie@FreeBSD.org If I use amd64, the "Check cmsghdr.cmsg_len" (t_cmsg_len) testcase will fai= l. If I use i386 however, it passes. I suspect (based on the size discrepancy) that one or more fields are being sized incorrectly (as pointers instead of scalars). In particular, the amount sent when testing on i386 is 96 bytes, whereas on amd64 it's 104 bytes. The reason why this is happening is the sizes in one = of the fields mismatch (another bug is coming soon for this hidden requirement buried in the kernel). amd64: $ cd tools/regression/sockets/unix_cmsg $ make -s clean $ make -s all $ ./unix_cmsg Running tests for SOCK_STREAM sockets: 1: Sending, receiving cmsgcred 2: Receiving sockcred (listening socket) 3: Receiving sockcred (accepted socket) 4: Sending cmsgcred, receiving sockcred 5: Sending, receiving timeval 6: Sending, receiving bintime 7: Check cmsghdr.cmsg_len CLIENT: sent message with cmsghdr.cmsg_len 12 < 16 SERVER: client exit status is 1 8: Check LOCAL_PEERCRED socket option -- 1 test failed! Running tests for SOCK_DGRAM sockets: 1: Sending, receiving cmsgcred 2: Receiving sockcred 3: Sending cmsgcred, receiving sockcred 4: Sending, receiving timeval 5: Sending, receiving bintime 6: Check cmsghdr.cmsg_len CLIENT: sent message with cmsghdr.cmsg_len 12 < 16 SERVER: client exit status is 1 -- 1 test failed! i386: $ cd tools/regression/sockets/unix_cmsg $ make -s clean $ make -s all $ ./unix_cmsg Running tests for SOCK_STREAM sockets: 1: Sending, receiving cmsgcred 2: Receiving sockcred (listening socket) 3: Receiving sockcred (accepted socket) 4: Sending cmsgcred, receiving sockcred 5: Sending, receiving timeval 6: Sending, receiving bintime 7: Check cmsghdr.cmsg_len 8: Check LOCAL_PEERCRED socket option -- all tests passed! Running tests for SOCK_DGRAM sockets: 1: Sending, receiving cmsgcred 2: Receiving sockcred 3: Sending cmsgcred, receiving sockcred 4: Sending, receiving timeval 5: Sending, receiving bintime 6: Check cmsghdr.cmsg_len -- all tests passed! $ uname -a FreeBSD fbsd11-i386.local 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r293737M: Tue Jan 12 09:48:34 PST 2016=20=20=20=20 ngie@fbsd11-i386.local:/usr/obj/usr/src/svn/sys/GENERIC-NODEBUG i386 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206543-32464>