[Bug 21276] python's test_uuid test fails

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jan 6 19:33:02 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=21276


Juan Lang <juan_lang at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #3 from Juan Lang <juan_lang at 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.



More information about the wine-bugs mailing list