Author barry
Recipients barry, serhiy.storchaka, vstinner
Date 2017-11-26.17:50:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On Nov 26, 2017, at 12:40, Serhiy Storchaka <> wrote:
> Serhiy Storchaka <> added the comment:
> If I understand correctly, the original problem was that tests failed in some environments, right? In that case we should either change the environment or just remove this check. I had added it in assumption that it is never failed for addresses obtained from network cards. If my assumption is wrong, it should be just removed.

I think your assumption is generally true in that *real* network cards (i.e. ethernet ports or wireless adapters) will always have universally administered MAC addresses.  But what you probably didn’t expect is that certain environments can also have locally administered MAC addresses (e.g. MBP’s Touch Bar interfaces - that one surprised me too!) and some may *only* have local MACs (e.g. Travis).

We can fix the first assumption by preferentially returning universal MACs, and only return local MACs if there are no other interfaces available.  My latest changes do this.  (Remember, I only started seeing the failures on my 2017 MBP with Touch Bar.)

I can’t think of any way of solving the second one, short of just skipping those tests on Travis.  I think any reasonable machine with real interfaces will have at least one universal MAC, so it’s just Travis being weird.  My latest commit adds a skip for Travis.  (That test is still running, so we’ll see.)

The original problem really was that the test for universal vs. local MAC address was using the incorrect bitmask.  The comment was also wrong, so my changes fix both the comment and the bitmask.

Another problem I found was that the UUID1 spec says that if a random MAC is used as a fallback, then the multicast bit must be set, so my changes also do this.

For now, I’d prefer to take the narrower approach of enabling the tests everywhere but Travis.  What I don’t know is whether any of the buildbots will fail in a similar way, but I’m hoping they’ll be okay.  If we see buildbot failures because they also lack universal MACs, then yes, we’ll have to reevaluate whether the tests make sense, or whether we should mock out the environment at a lower level.
Date User Action Args
2017-11-26 17:50:56barrysetrecipients: + barry, vstinner, serhiy.storchaka
2017-11-26 17:50:56barrylinkissue32107 messages
2017-11-26 17:50:56barrycreate