On 7/27/06, A.M. Kuchling <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 27, 2006 at 05:40:57PM +0200, Georg Brandl wrote:
> > The UUID test suite, which wasn't run by regrtest.py until now, is
> > now failing on some buildbots (and my machine). This should be fixed
> > before releasing something.
>
> Looking at the failures, there seem to be two problems on Unix variants:
> 1) on some, '/sbin/ifconfig' prints a help message; you need 'ifconfig -a'
> to print information about all interfaces.
> 2) on Solaris 9 (the only version in the SF compile farm), I can't
> figure out how to make ifconfig print MAC addresses at all.
> Searching online finds the incantation 'arp <hostname>' to print the
> MAC.
This is such a mess. There are so many different ways of determining
the MAC addr on each flavour of Unix it seems hopeless to try. I
fixed _ifconfig_getnode so it should work on at least: Linux, Tru64,
Solaris, and HP-UX. Who knows how many more variations there are.
This only fixes 1 of the 2 failures in test_uuid. The other one is
due to _unixdll_getnode() failing. This is because
_uuid_generate_time is None because we couldn't find it in the uuid
library. This is just broken, not sure if it's the code or the test
though. We should handle the case if _uuid_generate_time and the
others are None better. I don't know what to do in this case.
Since getnode ignores exceptions, maybe it's the test that is broken?
My 2 cents: since there is no POSIX standard for getting a list of network interfaces, trying to account for all the platform variations is one central location is hopeless. Instead, I think the onus should be on whomever is testing this on a particular platform -- in short, on the buildbot maintainer on that platform.
There could be another regrtest.py-type suite, something like platform_regrtest.py for example, which could be composed of highly platform-dependent tests such as test_uuid.py. These tests would have empty methods such as _ifconfig_getnode, which would then be defined on a per-platform basis by the buildbot maintainer on that platform. The test would obviously fail by default, unless those methods are properly defined. Or these methods could account for just one platform, as an example of what to do on other platforms.
Grig
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com