This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_uuid is warning about unreliable functions
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: skrah Nosy List: akuchling, brian.curtin, christian.heimes, skrah
Priority: normal Keywords: patch

Created on 2007-11-21 08:17 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue1481.diff brian.curtin, 2010-01-29 01:55 patch against py3k r77817
Messages (6)
msg57733 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-21 08:17
I'm putting the report into the tracker as a reminder.

    WARNING: uuid.getnode is unreliable on many platforms.
        It is disabled until the code and/or test can be fixed properly.
    WARNING: uuid._ifconfig_getnode is unreliable on many platforms.
        It is disabled until the code and/or test can be fixed properly.
    WARNING: uuid._unixdll_getnode is unreliable on many platforms.
        It is disabled until the code and/or test can be fixed properly.
msg98496 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-01-29 01:55
These tests have been disabled for a little over two years now. I've run the previously disabled tests on Windows, Mac OSX, and Linux numerous times and haven't seen any instability or failures (not that it proves much). 

I wasn't around at the time to know what specific platforms caused the instability and don't see any evidence, but can we re-enable them to see if and where they cause problems today? The attached patch re-enables the disabled tests, and brings the if-statement skipping up to speed with skip decorators.
msg99710 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2010-02-22 04:12
They were disabled in r50949, with the comment:
========
Disable these tests until they are reliable across platforms.  
These problems may mask more important, real problems.

One or both methods are known to fail on: Solaris, OpenBSD, Debian, Ubuntu.
They pass on Windows and some Linux boxes.
========

Some of them seem to only work on one platform, so maybe someone could write some platform-checking code to skip tests as necessary.
msg102614 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-04-08 10:55
Still fails with trunk on OpenBSD. The error is more ctypes related
though: _uuid_generate_time isn't set.


======================================================================
ERROR: test_unixdll_getnode (__main__.TestUUID)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_uuid.py", line 332, in test_unixdll_getnode
    self.check_node(uuid._unixdll_getnode(), 'unixdll')
  File "/home/stefan/svn/trunk/Lib/uuid.py", line 429, in _unixdll_getnode
    _uuid_generate_time(_buffer)
TypeError: 'NoneType' object is not callable

----------------------------------------------------------------------
msg102627 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-04-08 16:28
With test_uuid.patch from issue 3581 (related) no warnings can be seen on the buildbots.
msg102933 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-04-12 09:32
Issue fixed by test_uuid3.patch from issue 3581 in trunk (r79954),
release26-maint (r79959), py3k (r79960) and release31-maint (r79961).
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45822
2010-05-13 13:57:07skrahsetstatus: pending -> closed
2010-04-12 09:32:45skrahsetstatus: open -> pending
messages: + msg102933

assignee: skrah
keywords: - needs review
resolution: accepted
stage: patch review -> resolved
2010-04-08 16:28:56skrahsetmessages: + msg102627
2010-04-08 10:55:58skrahsetnosy: + skrah
messages: + msg102614
2010-02-22 04:12:10akuchlingsetnosy: + akuchling
messages: + msg99710
2010-01-29 01:55:34brian.curtinsetfiles: + issue1481.diff

versions: + Python 3.1, Python 2.7, Python 3.2, - Python 3.0
keywords: + patch, needs review
nosy: + brian.curtin

messages: + msg98496
stage: patch review
2008-01-06 22:29:44adminsetkeywords: - py3k
versions: Python 2.6, Python 3.0
2007-11-21 08:17:48christian.heimescreate