Bug 1264912

Summary: astropy: failed tests in ppc64
Product: [Fedora] Fedora Reporter: Rafael Fonseca <rdossant>
Component: python-astropyAssignee: Sergio Pascual <sergio.pasra>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: sergio.pasra
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 17:58:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880    

Description Rafael Fonseca 2015-09-21 12:47:03 UTC
Description of problem: some tests fail only in ppc64 (ppc64le is fine). This is the output from ppc-koji:

=================================== FAILURES ===================================
____________________ TestSingleTable.test_read_from_fileobj ____________________
self = <astropy.io.fits.tests.test_connect.TestSingleTable object at 0x3fffa9fdf210>
tmpdir = local('/tmp/pytest-0/test_read_from_fileobj0')
    def test_read_from_fileobj(self, tmpdir):
        filename = str(tmpdir.join('test_read_from_fileobj.fits'))
        hdu = BinTableHDU(self.data)
        hdu.writeto(filename)
        with open(filename, 'rb') as f:
            t = Table.read(f)
>       assert equal_data(t, self.data)
E       assert equal_data(<Table masked=False length=4>\n  a      b        c   \nint64 string32 float64\n--...�a     2.3\n    2     ���b     4.5\n    3     ���c     6.7\n    4     ���d     8.9, array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestSingleTable object at 0x3fffa9fdf210>.data
astropy/io/fits/tests/test_connect.py:130: AssertionError
__________________________ TestMultipleHDU.test_read ___________________________
self = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fffaabd0510>
tmpdir = local('/tmp/pytest-0/test_read0')
    def test_read(self, tmpdir):
        filename = str(tmpdir.join('test_read.fits'))
        self.hdus.writeto(filename)
        with catch_warnings() as l:
            t = Table.read(filename)
        assert len(l) == 1
        assert str(l[0].message).startswith(
            'hdu= was not specified but multiple tables are present, reading in first available table (hdu=1)')
>       assert equal_data(t, self.data1)
E       assert equal_data(<Table masked=False length=4>\n  a      b        c   \nint64 string32 float64\n--...�a     2.3\n    2     ���b     4.5\n    3     ���c     6.7\n    4     ���d     8.9, array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fffaabd0510>.data1
astropy/io/fits/tests/test_connect.py:168: AssertionError
___________________ TestMultipleHDU.test_read_with_hdu_1[1] ____________________
self = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fffa9fbe310>
tmpdir = local('/tmp/pytest-0/test_read_with_hdu_1_1_0'), hdu = 1
    @pytest.mark.parametrize('hdu', [1, 'first'])
    def test_read_with_hdu_1(self, tmpdir, hdu):
        filename = str(tmpdir.join('test_read_with_hdu_1.fits'))
        self.hdus.writeto(filename)
        with catch_warnings() as l:
            t = Table.read(filename, hdu=hdu)
        assert len(l) == 0
>       assert equal_data(t, self.data1)
E       assert equal_data(<Table masked=False length=4>\n  a      b        c   \nint64 string32 float64\n--...�a     2.3\n    2     ���b     4.5\n    3     ���c     6.7\n    4     ���d     8.9, array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fffa9fbe310>.data1
astropy/io/fits/tests/test_connect.py:184: AssertionError
_________________ TestMultipleHDU.test_read_with_hdu_1[first] __________________
self = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fffaa36de90>
tmpdir = local('/tmp/pytest-0/test_read_with_hdu_1_first_0'), hdu = 'first'
    @pytest.mark.parametrize('hdu', [1, 'first'])
    def test_read_with_hdu_1(self, tmpdir, hdu):
        filename = str(tmpdir.join('test_read_with_hdu_1.fits'))
        self.hdus.writeto(filename)
        with catch_warnings() as l:
            t = Table.read(filename, hdu=hdu)
        assert len(l) == 0
>       assert equal_data(t, self.data1)
E       assert equal_data(<Table masked=False length=4>\n  a      b        c   \nint64 string32 float64\n--...�a     2.3\n    2     ���b     4.5\n    3     ���c     6.7\n    4     ���d     8.9, array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, u'a', 2.3), (2, u'b', 4.5), (3, u'c', 6.7), (4, u'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fffaa36de90>.data1
astropy/io/fits/tests/test_connect.py:184: AssertionError
================ 2 tests deselected by '-knot test_web_profile' ================
 4 failed, 8522 passed, 142 skipped, 2 deselected, 41 xfailed, 2 xpassed, 9 warnings in 387.95 seconds


Version-Release number of selected component (if applicable): 1.0.4-1


How reproducible: ppc-koji build python-astropy in ppc64.


Additional info: I modified the equal_data function like this:

def equal_data(a, b):
    for name in a.dtype.names:
        if not np.all(a[name] == b[name]):
            print('a', a)
            print('b', b)
            print(name, ':', '#', a[name], '#', '@', b[name], '@')
            return False
    return True

and this is the output:

=================================== FAILURES ====================================
____________________ TestSingleTable.test_read_from_fileobj _____________________

self = <astropy.io.fits.tests.test_connect.TestSingleTable object at 0x3fff7dfdefd0>
tmpdir = local('/tmp/pytest-6/test_read_from_fileobj0')

    def test_read_from_fileobj(self, tmpdir):
        filename = str(tmpdir.join('test_read_from_fileobj.fits'))
        hdu = BinTableHDU(self.data)
        hdu.writeto(filename)
        with open(filename, 'rb') as f:
            t = Table.read(f)
>       assert equal_data(t, self.data)
E       assert equal_data(<Table masked=False length=4>\n  a     b       c   \nint64 str128 float64\n----- ------ -------\n    1   a     2.3\n    2   b     4.5\n    3   c     6.7\n    4   d     8.9, array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestSingleTable object at 0x3fff7dfdefd0>.data

astropy/io/fits/tests/test_connect.py:133: AssertionError
----------------------------- Captured stdout call ------------------------------
a  a   b    c 
--- ---- ---
  1 a 2.3
  2 b 4.5
  3 c 6.7
  4 d 8.9
b [(1, 'a', 2.3) (2, 'b', 4.5) (3, 'c', 6.7) (4, 'd', 8.9)]
b : #  b  
----
a
b
c
d # @ ['a' 'b' 'c' 'd'] @
___________________________ TestMultipleHDU.test_read ___________________________

self = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fff7e97f278>
tmpdir = local('/tmp/pytest-6/test_read0')

    def test_read(self, tmpdir):
        filename = str(tmpdir.join('test_read.fits'))
        self.hdus.writeto(filename)
        with catch_warnings() as l:
            t = Table.read(filename)
        assert len(l) == 1
        assert str(l[0].message).startswith(
            'hdu= was not specified but multiple tables are present, reading in first available table (hdu=1)')
>       assert equal_data(t, self.data1)
E       assert equal_data(<Table masked=False length=4>\n  a     b       c   \nint64 str128 float64\n----- ------ -------\n    1   a     2.3\n    2   b     4.5\n    3   c     6.7\n    4   d     8.9, array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fff7e97f278>.data1

astropy/io/fits/tests/test_connect.py:171: AssertionError
----------------------------- Captured stdout call ------------------------------
a  a   b    c 
--- ---- ---
  1 a 2.3
  2 b 4.5
  3 c 6.7
  4 d 8.9
b [(1, 'a', 2.3) (2, 'b', 4.5) (3, 'c', 6.7) (4, 'd', 8.9)]
b : #  b  
----
a
b
c
d # @ ['a' 'b' 'c' 'd'] @
____________________ TestMultipleHDU.test_read_with_hdu_1[1] ____________________

self = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fff7e91c940>
tmpdir = local('/tmp/pytest-6/test_read_with_hdu_1_1_0'), hdu = 1

    @pytest.mark.parametrize('hdu', [1, 'first'])
    def test_read_with_hdu_1(self, tmpdir, hdu):
        filename = str(tmpdir.join('test_read_with_hdu_1.fits'))
        self.hdus.writeto(filename)
        with catch_warnings() as l:
            t = Table.read(filename, hdu=hdu)
        assert len(l) == 0
>       assert equal_data(t, self.data1)
E       assert equal_data(<Table masked=False length=4>\n  a     b       c   \nint64 str128 float64\n----- ------ -------\n    1   a     2.3\n    2   b     4.5\n    3   c     6.7\n    4   d     8.9, array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fff7e91c940>.data1

astropy/io/fits/tests/test_connect.py:187: AssertionError
----------------------------- Captured stdout call ------------------------------
a  a   b    c 
--- ---- ---
  1 a 2.3
  2 b 4.5
  3 c 6.7
  4 d 8.9
b [(1, 'a', 2.3) (2, 'b', 4.5) (3, 'c', 6.7) (4, 'd', 8.9)]
b : #  b  
----
a
b
c
d # @ ['a' 'b' 'c' 'd'] @
__________________ TestMultipleHDU.test_read_with_hdu_1[first] __________________

self = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fff7e60d668>
tmpdir = local('/tmp/pytest-6/test_read_with_hdu_1_first_0'), hdu = 'first'

    @pytest.mark.parametrize('hdu', [1, 'first'])
    def test_read_with_hdu_1(self, tmpdir, hdu):
        filename = str(tmpdir.join('test_read_with_hdu_1.fits'))
        self.hdus.writeto(filename)
        with catch_warnings() as l:
            t = Table.read(filename, hdu=hdu)
        assert len(l) == 0
>       assert equal_data(t, self.data1)
E       assert equal_data(<Table masked=False length=4>\n  a     b       c   \nint64 str128 float64\n----- ------ -------\n    1   a     2.3\n    2   b     4.5\n    3   c     6.7\n    4   d     8.9, array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]))
E        +  where array([(1, 'a', 2.3), (2, 'b', 4.5), (3, 'c', 6.7), (4, 'd', 8.9)], \n      dtype=[('a', '>i8'), ('b', '>U1'), ('c', '>f8')]) = <astropy.io.fits.tests.test_connect.TestMultipleHDU object at 0x3fff7e60d668>.data1

astropy/io/fits/tests/test_connect.py:187: AssertionError
----------------------------- Captured stdout call ------------------------------
a  a   b    c 
--- ---- ---
  1 a 2.3
  2 b 4.5
  3 c 6.7
  4 d 8.9
b [(1, 'a', 2.3) (2, 'b', 4.5) (3, 'c', 6.7) (4, 'd', 8.9)]
b : #  b  
----
a
b
c
d # @ ['a' 'b' 'c' 'd'] @
================ 2 tests deselected by '-knot test_web_profile' =================
 4 failed, 6070 passed, 120 skipped, 2 deselected, 39 xfailed, 2 xpassed, 9 warnings in 207.04 seconds

Comment 1 Sergio Pascual 2015-09-23 22:00:06 UTC
Thank you, I will report this upstream

Comment 2 Sergio Pascual 2015-09-23 22:09:18 UTC
Reported:

https://github.com/astropy/astropy/issues/4185

Comment 3 Sergio Pascual 2016-01-12 22:56:11 UTC
There is a new astropy-1.1.1 in Rawhide. Perhaps this bug has been fixed?

Comment 4 Rafael Fonseca 2016-01-13 08:26:31 UTC
A scratch build [1] went fine on ppc64.

[1] http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3061160

Comment 5 Fedora End Of Life 2016-07-19 17:58:14 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.