[Bug 21276] New: python's test_uuid test fails
http://bugs.winehq.org/show_bug.cgi?id=21276 Summary: python's test_uuid test fails Product: Wine Version: 1.1.35 Platform: x86 URL: http://www.python.org OS/Version: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs(a)winehq.org ReportedBy: austinenglish(a)gmail.com Created an attachment (id=25586) --> (http://bugs.winehq.org/attachment.cgi?id=25586) test output Install python and run: wine 'c:\Python31\python.exe' -m test.test_uuid test_windll_getnode (__main__.TestUUID) ... FAIL ====================================================================== FAIL: test_windll_getnode (__main__.TestUUID) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python31\lib\test\test_uuid.py", line 354, in test_windll_getnode self.check_node(uuid._windll_getnode(), 'windll') File "C:\Python31\lib\test\test_uuid.py", line 293, in check_node self.assertEqual(universal_local_bit, 0, message) AssertionError: 3ea2990eaebd doesn't look like a real MAC address Full output attached. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #1 from Austin English <austinenglish(a)gmail.com> 2010-01-06 16:07:48 --- Created an attachment (id=25587) --> (http://bugs.winehq.org/attachment.cgi?id=25587) test file -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #2 from Austin English <austinenglish(a)gmail.com> 2010-01-06 18:30:06 --- Also fails on my home machine. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Juan Lang <juan_lang(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #3 from Juan Lang <juan_lang(a)yahoo.com> 2010-01-06 19:33:02 --- I believe this is a bug in the python test code, not in Wine. Wine's UuidCreate function follows RFC 4122, section 4.4. That is, it generates a Uuid from a pseudorandom number generator, not from a MAC address. Thus, the error message from the test program is correct: it doesn't appear to be a MAC address. On the other hand, it's not an error: this is expected. The python code should be checking the version field of the generated Uuid first. If it's 1, then the generated Uuid *may* be expected to contain a MAC address. From RFC 4122, section 4.1.6: For UUID version 1, the node field consists of an IEEE 802 MAC address, usually the host address. For systems with multiple IEEE 802 addresses, any available one can be used. The lowest addressed octet (octet number 10) contains the global/local bit and the unicast/multicast bit, and is the first octet of the address transmitted on an 802.3 LAN. However, the test for the most significant bit not being set is also invalid on systems with no MAC address. From the python code: self.assertTrue(node < (1 << 48), message) The most significant bit of a MAC address is set when the MAC address is a multicast address. For systems with no MAC address, a multicast address is supposed to be used. Also from RFC 4122, section 4.1.6: For systems with no IEEE address, a randomly or pseudo-randomly generated value may be used; see Section 4.5. The multicast bit must be set in such addresses, in order that they will never conflict with addresses obtained from network cards. This analysis may of use to the Python folks, but it certainly isn't a Wine bug. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Austin English <austinenglish(a)gmail.com> 2010-01-06 19:50:20 --- Thanks, filed a python bug: http://bugs.python.org/issue7650 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Juan Lang <juan_lang(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Component|-unknown |rpc Resolution|INVALID | --- Comment #5 from Juan Lang <juan_lang(a)yahoo.com> 2010-01-07 09:22:07 --- Whoops, I didn't notice that Python uses UuidCreateSequential. From MSDN: For security reasons, UuidCreate was modified so that it no longer uses a machine's MAC address to generate UUIDs. UuidCreateSequential was introduced to allow creation of UUIDs using the MAC address of a machine's Ethernet card. I'm reopening this, as Wine's implementation of UuidCreateSequential calls UuidCreate, whereas it should use the MAC address-based method. Setting component to rpcrt4, too. My comment about the multicast bit occasionally being set (when the machine on which UuidCreateSequential is called has no MAC address) still stands, so there's still a Python bug. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #6 from Juan Lang <juan_lang(a)yahoo.com> 2010-01-07 09:39:20 --- Created an attachment (id=25603) --> (http://bugs.winehq.org/attachment.cgi?id=25603) Patch: Implement UuidCreateSequential using the machine's MAC address, when available Does this patch help? Adding a test for UuidCreateSequential to our test suite would be better, of course. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Juan Lang <juan_lang(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |juan_lang(a)yahoo.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Status|REOPENED |NEW --- Comment #7 from Austin English <austinenglish(a)gmail.com> 2010-01-07 11:35:09 --- (In reply to comment #6)
Created an attachment (id=25603) --> (http://bugs.winehq.org/attachment.cgi?id=25603) [details] Patch: Implement UuidCreateSequential using the machine's MAC address, when available
Does this patch help? Adding a test for UuidCreateSequential to our test suite would be better, of course.
Works great, test passes after that. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #8 from Juan Lang <juan_lang(a)yahoo.com> 2010-01-08 12:31:45 --- The patch got the "Pending" status, which probably means it needs a test case. It did anyway. Porting the Python test would probably be a start, although the machine should be checked for whether it has a MAC address before checking whether the most significant bit of the MAC address field of the generated UUID is cleared. The Python test should do the same, of course. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> 2010-01-08 14:10:18 --- I'm not convinced we need the extra complexity. It seems unlikely that a real app would depend on this. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #10 from Juan Lang <juan_lang(a)yahoo.com> 2010-01-08 14:35:15 --- Hm. Even though UuidCreateSequential was added precisely because the behavior of UuidCreate changed, so presumably the callers of UuidCreateSequential really want the old, MAC address-based behavior? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #11 from Juan Lang <juan_lang(a)yahoo.com> 2010-01-08 14:42:13 --- A quick Google search for UuidCreateSequential shows that some people have tried to use it to find the machine's MAC address: http://www.codeproject.com/KB/cpp/softwarekey.aspx http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2008-09/msg00... http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c5451... It seems probable that some app somewhere depends on this. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Juan Lang <juan_lang(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maciekw5(a)gmail.com --- Comment #12 from Juan Lang <juan_lang(a)yahoo.com> 2010-03-03 16:43:01 --- *** Bug 21779 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Juan Lang <juan_lang(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25603|0 |1 is obsolete| | --- Comment #13 from Juan Lang <juan_lang(a)yahoo.com> 2010-03-03 16:47:13 --- (From update of attachment 25603) Updated patches sent: http://www.winehq.org/pipermail/wine-patches/2010-March/085495.html http://www.winehq.org/pipermail/wine-patches/2010-March/085496.html -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #14 from Austin English <austinenglish(a)gmail.com> 2010-03-04 11:26:09 --- (In reply to comment #13)
(From update of attachment 25603 [details]) Updated patches sent: http://www.winehq.org/pipermail/wine-patches/2010-March/085495.html http://www.winehq.org/pipermail/wine-patches/2010-March/085496.html
Committed: http://source.winehq.org/git/wine.git/?a=commitdiff;h=86292d1dbacfd626452f79... http://source.winehq.org/git/wine.git/?a=commitdiff;h=b61c8f8b53ed9b138f8660... Thanks Juan!! -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #15 from Alexandre Julliard <julliard(a)winehq.org> 2010-03-05 12:43:17 --- Closing bugs fixed in 1.1.40. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=21276 --- Comment #16 from Austin English <austinenglish(a)gmail.com> 2010-04-12 11:03:37 --- (In reply to comment #4)
Thanks, filed a python bug: http://bugs.python.org/issue7650
For those curious, fixed in Python SVN: http://svn.python.org/view/python/trunk/Lib/test/test_uuid.py?r1=79954&r2=79... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org