(self)
| 4154 | |
| 4155 | @requireAttrs(socket, "CMSG_SPACE") |
| 4156 | def testFDPassPartialIntInMiddle(self): |
| 4157 | # Try to pass two FD arrays, the first of which is truncated. |
| 4158 | msg, ancdata, flags, addr = self.doRecvmsg(self.serv_sock, |
| 4159 | len(MSG), 10240) |
| 4160 | self.assertEqual(msg, MSG) |
| 4161 | self.checkRecvmsgAddress(addr, self.cli_addr) |
| 4162 | self.checkFlags(flags, eor=True, ignore=socket.MSG_CTRUNC) |
| 4163 | self.assertLessEqual(len(ancdata), 2) |
| 4164 | fds = array.array("i") |
| 4165 | # Arrays may have been combined in a single control message |
| 4166 | for cmsg_level, cmsg_type, cmsg_data in ancdata: |
| 4167 | self.assertEqual(cmsg_level, socket.SOL_SOCKET) |
| 4168 | self.assertEqual(cmsg_type, socket.SCM_RIGHTS) |
| 4169 | fds.frombytes(cmsg_data[: |
| 4170 | len(cmsg_data) - (len(cmsg_data) % fds.itemsize)]) |
| 4171 | self.assertLessEqual(len(fds), 2) |
| 4172 | self.checkFDs(fds) |
| 4173 | |
| 4174 | @testFDPassPartialIntInMiddle.client_skip |
| 4175 | def _testFDPassPartialIntInMiddle(self): |
nothing calls this directly
no test coverage detected