http://bugs.python.org/review/15359/diff/7130/Lib/test/test_socket.py
File Lib/test/test_socket.py (right):
http://bugs.python.org/review/15359/diff/7130/Lib/test/test_socket.py#newcode...
Lib/test/test_socket.py:1393:
On 2013/01/16 22:28:42, Charles-François Natali wrote:
> You must skip this test is CAN sockets are not supported:
> """
> @unittest.skipUnless(HAVE_SOCKET_CAN, 'SocketCan required for this test.')
> @unittest.skipUnless(thread, 'Threading required for this test.')
> """
I've removed this class. It had inherited from CANTest so functionally this
already works. Is it necessary just for code readability? I notice all the
skipUnless threading could be refactored into two places too.
http://bugs.python.org/review/15359/diff/7130/Lib/test/test_socket.py#newcode...
Lib/test/test_socket.py:1431: """Must use native not standard types for packing
On 2013/01/16 22:28:42, Charles-François Natali wrote:
> You should move the comment and the struct format in the class definition
before
> the methods.
Done.
http://bugs.python.org/review/15359/diff/7130/Lib/test/test_socket.py#newcode...
Lib/test/test_socket.py:1443: bcm_cmd_msg_fmt = "@IIIllllII"
On 2013/01/16 22:28:42, Charles-François Natali wrote:
> I got a deadlock during the test, because sending on the BCM socket returned
> EINVAL.
> The problem is that the struct definition uses the zero-length array trick,
but
> on my box sizeof(struct bcm_msg_head) returns 40 instead of 36, because
> can_frame must be 8 bytes aligned (data field).
>
> So in short, I think the format should be:
> "=IIIllllII4x"
>
> '=' because you want native endianess, but standard size and alignment.
Hmm using a format of "=IIIllllII4x" causes the test to fail on my box. We will
need to rethink this further.
http://bugs.python.org/review/15359/diff/7130/Lib/test/test_socket.py#newcode...
Lib/test/test_socket.py:4887: """
On 2013/01/16 22:28:42, Charles-François Natali wrote:
> What's this?
My mistake, I just commented out the other tests while developing.
Issue 15359: Sockets support for CAN_BCM
Created 10 months, 1 week ago by Brian
Modified 3 months, 4 weeks ago
Reviewers: Charles-François Natali
Base URL: None
Comments: 10