Author barry
Recipients barry, serhiy.storchaka
Date 2017-11-21.20:24:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511295895.74.0.213398074469.issue32107@psf.upfronthosting.co.za>
In-reply-to
Content
Yikes.  It's entirely possible that these tests are tainted by environmental leakage.  I was looking into why Travis fails on my PR:

https://travis-ci.org/python/cpython/jobs/305433725

and stepping through _ifconfig_getnode() on my Mac.  The "ibridge" interface is getting returned, which has a MAC address of:

>>> from uuid import _ifconfig_getnode
>>> mac = _ifconfig_getnode()
>>> hex(mac)
'0xacde48001122'

That's for the en5 interface, which according to this article is the bridge to the Touch Bar, and *the same on every Mac*.

https://discussions.apple.com/thread/7763102?start=0&tstart=0

Why I think that's problematic for this particular test is that whatever gets returned is going to be highly dependent on the hardware the test is run on, and it's entirely possible that the MAC address returned is indeed locally administered and not tied to a physical external (and thus required to be universally administered) MAC address.

Mocking _ifconfig_*() probably isn't a good idea because these tests are worthless that way.  But it's also true that the _ifconfig_*() methods can match unexpected interfaces which cause the test to fail incorrectly.  It's a mess, and I'm not sure what to do about it.
History
Date User Action Args
2017-11-21 20:24:55barrysetrecipients: + barry, serhiy.storchaka
2017-11-21 20:24:55barrysetmessageid: <1511295895.74.0.213398074469.issue32107@psf.upfronthosting.co.za>
2017-11-21 20:24:55barrylinkissue32107 messages
2017-11-21 20:24:55barrycreate