[Python-Dev] uuid test suite failing

Grig Gheorghiu grig.gheorghiu at gmail.com
Fri Jul 28 16:46:55 CEST 2006


On 7/28/06, Neal Norwitz <nnorwitz at gmail.com> wrote:
>
> On 7/27/06, A.M. Kuchling <amk at amk.ca> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060728/aaf51821/attachment.html 


More information about the Python-Dev mailing list