Skip to content

BUG: Fix testsuite failures on ppc and riscv#13095

Merged
mattip merged 2 commits intonumpy:masterfrom
andreas-schwab:master
Mar 6, 2019
Merged

BUG: Fix testsuite failures on ppc and riscv#13095
mattip merged 2 commits intonumpy:masterfrom
andreas-schwab:master

Conversation

@andreas-schwab
Copy link
Copy Markdown
Contributor

https://build.opensuse.org/package/live_build_log/openSUSE:Factory:PowerPC/python-numpy/standard/ppc:

=================================== FAILURES ===================================
_________________ TestConversion.test_int_from_huge_longdouble _________________

self = <numpy.core.tests.test_scalarmath.TestConversion object at 0xef02fef0>

@pytest.mark.skipif(np.finfo(np.double) == np.finfo(np.longdouble),
                    reason="long double is same as double")
@pytest.mark.skipif(platform.machine().startswith("ppc64"),
                    reason="IBM double double")
def test_int_from_huge_longdouble(self):
    # Produce a longdouble that would overflow a double,
    # use exponent that avoids bug in Darwin pow function.
    exp = np.finfo(np.double).maxexp - 1
  huge_ld = 2 * 1234 * np.longdouble(2) ** exp

E RuntimeWarning: overflow encountered in longdouble_scalars

exp = 1023
self = <numpy.core.tests.test_scalarmath.TestConversion object at 0xef02fef0>

../../../BUILDROOT/python-numpy-1.16.1-3.1.ppc/usr/lib/python2.7/site-packages/numpy/core/tests/test_scalarmath.py:431: RuntimeWarning
______________________________ TestKind.test_all _______________________________

self = <numpy.f2py.tests.test_kind.TestKind object at 0xeede8d50>

@pytest.mark.slow
def test_all(self):
    selectedrealkind = self.module.selectedrealkind
    selectedintkind = self.module.selectedintkind

    for i in range(40):
        assert_(selectedintkind(i) in [selected_int_kind(i), -1],
                'selectedintkind(%s): expected %r but got %r' %
                (i, selected_int_kind(i), selectedintkind(i)))

    for i in range(20):
        assert_(selectedrealkind(i) in [selected_real_kind(i), -1],
                'selectedrealkind(%s): expected %r but got %r' %
              (i, selected_real_kind(i), selectedrealkind(i)))

E AssertionError: selectedrealkind(16): expected 10 but got 16

i = 16
selectedintkind =
selectedrealkind =
self = <numpy.f2py.tests.test_kind.TestKind object at 0xeede8d50>

../../../BUILDROOT/python-numpy-1.16.1-3.1.ppc/usr/lib/python2.7/site-packages/numpy/f2py/tests/test_kind.py:34: AssertionError
= 2 failed, 7227 passed, 132 skipped, 11 xfailed, 2 xpassed in 490.92 seconds ==

This fixes TestConversion.test_int_from_huge_longdouble.
This fixes numpy.f2py.tests.test_kind.TestKind
@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 5, 2019

Test failure not connected, comes from the doctests failing. See #13096

@charris charris added this to the 1.16.3 release milestone Mar 5, 2019
@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 6, 2019

@andreas-schwab does numpy build/run/pass tests on riscv?

@andreas-schwab
Copy link
Copy Markdown
Contributor Author

All except of numpy.core.tests.test_numeric.TestBoolCmp.

https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/python-numpy

@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 6, 2019

Cool . I do see another couple of patches, is the remove-__declspec.patch still needed to reduce warnings?

@andreas-schwab
Copy link
Copy Markdown
Contributor Author

I don't know about the other patches, I do not maintain the openSUSE package.

@mattip mattip merged commit cf73967 into numpy:master Mar 6, 2019
@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 6, 2019

Thanks @andreas-schwab

@charris charris changed the title Fix testsuite failures on ppc and riscv BUG: Fix testsuite failures on ppc and riscv Mar 6, 2019
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Mar 16, 2019
@charris charris removed this from the 1.16.3 release milestone Mar 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants