Issue #3 new

testFileRead fails on Debian/unstable

Hans-Christoph Steiner avatarHans-Christoph Steiner created an issue

I'm in the process of packaging biplist for Debian. Building it for upload, I run into this problem with the tests:

======================================================================
FAIL: testFileRead (test_valid.TestValidPlistFile)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/buildd/python-biplist-0.6/tests/test_valid.py", line 26, in testFileRead
    self.validateSimpleBinaryRoot(result)
  File "/tmp/buildd/python-biplist-0.6/tests/test_valid.py", line 15, in validateSimpleBinaryRoot
    self.assertEquals(root[six.b('dateItem')], datetime.datetime(2010, 8, 19, 22, 27, 30, 385449), "dates not equal" )
AssertionError: datetime.datetime(2010, 8, 19, 22, 27, 30, 385448) != datetime.datetime(2010, 8, 19, 22, 27, 30, 385449) : dates not equal

Here are the relevant package versions:

Setting up libpython3.3-minimal:amd64 (3.3.2-7) ...
Setting up libpython3.3-stdlib:amd64 (3.3.2-7) ...
Setting up libunistring0:amd64 (0.9.3-5) ...
Setting up libpython2.7-minimal:amd64 (2.7.5-8) ...
Setting up python2.7-minimal (2.7.5-8) ...
Setting up python3.3-minimal (3.3.2-7) ...
Setting up libpython2.7-stdlib:amd64 (2.7.5-8) ...
Setting up python2.7 (2.7.5-8) ...
Setting up python-minimal (2.7.5-5) ...
Setting up libpython-stdlib:amd64 (2.7.5-5) ...
Setting up python (2.7.5-5) ...
Setting up python3.3 (3.3.2-7) ...
Setting up python3-minimal (3.3.2-17) ...
Setting up libpython3-stdlib:amd64 (3.3.2-17) ...
Setting up python-all (2.7.5-5) ...
Setting up python-pkg-resources (0.6.49-2) ...
Setting up python-coverage (3.7+dfsg.1-2) ...
Setting up python-nose (1.3.0-2) ...
Setting up python-setuptools (0.6.49-2) ...
Setting up python-six (1.4.1-1) ...
Setting up python3 (3.3.2-17) ...
Setting up python3-all (3.3.2-17) ...
Setting up python3-pkg-resources (0.6.49-2) ...
Setting up python3-coverage (3.7+dfsg.1-2) ...
Setting up python3-nose (1.3.0-2) ...
Setting up python3-setuptools (0.6.49-2) ...
Setting up python3-six (1.4.1-1) ...

Attached is the full build log.

Comments (5)

  1. Andrew Wooster

    Optimally I'd like to fix it. I'll be doing some work with Debian this weekend on EC2, and will check to see if I can repro this. If not, I'll probably need more detailed configuration information (kernel version, Debian distro, hardware info, etc). Also, is this repeatable? (eg does it break every time)

  2. Andrew Wooster

    Just tested this with Debian precise64 on Intel hardware and wasn't able to reproduce. I'll take a patch, but I don't have amd64 hardware to test this on and not a lot of time to look into it.

    I wouldn't expect Intel and AMD hardware to behave differently on the actual floating point numbers, so it's possible there's a behavior difference not in my code.

    The code failure in question reduces to:

    import binascii
    import datetime
    import struct
    
    data = binascii.unhexlify('41b21de75262acc9')
    unpacked_date = struct.unpack(">d", data)[0]
    date = datetime.datetime.utcfromtimestamp(unpacked_date + 978307200)
    date == datetime.datetime(2010, 8, 19, 22, 27, 30, 385449)
    

    It would be helpful to know at which point in the above things differ from other platforms.

  3. Andrew Wooster

    Actually, I remembered another machine I have access to…

    Tested on Gentoo Linux/amd64 AMD Opteron 6276, and got expected output both for the above and for the unit tests.

    Given that, this seems like a software difference somewhere else in the stack.

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.