(self)
| 4257 | |
| 4258 | @requireAttrs(socket, "CMSG_SPACE") |
| 4259 | def testFDPassPartialIntInMiddle(self): |
| 4260 | # Try to pass two FD arrays, the first of which is truncated. |
| 4261 | msg, ancdata, flags, addr = self.doRecvmsg(self.serv_sock, |
| 4262 | len(MSG), 10240) |
| 4263 | self.assertEqual(msg, MSG) |
| 4264 | self.checkRecvmsgAddress(addr, self.cli_addr) |
| 4265 | self.checkFlags(flags, eor=True, ignore=socket.MSG_CTRUNC) |
| 4266 | self.assertLessEqual(len(ancdata), 2) |
| 4267 | fds = array.array("i") |
| 4268 | # Arrays may have been combined in a single control message |
| 4269 | for cmsg_level, cmsg_type, cmsg_data in ancdata: |
| 4270 | self.assertEqual(cmsg_level, socket.SOL_SOCKET) |
| 4271 | self.assertEqual(cmsg_type, socket.SCM_RIGHTS) |
| 4272 | fds.frombytes(cmsg_data[: |
| 4273 | len(cmsg_data) - (len(cmsg_data) % fds.itemsize)]) |
| 4274 | self.assertLessEqual(len(fds), 2) |
| 4275 | self.checkFDs(fds) |
| 4276 | |
| 4277 | @testFDPassPartialIntInMiddle.client_skip |
| 4278 | def _testFDPassPartialIntInMiddle(self): |
nothing calls this directly
no test coverage detected