Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 672730

Summary: dev-python/numpy-1.14.5: FAIL: numpy.core.tests.test_arrayprint.TestComplexArray.test_str on ppc64
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: eike, python
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: PPC64   
OS: Linux   
URL: https://github.com/numpy/numpy/issues/12638
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log.xz
emerge --info
build.log.xz (1.10.4)
build.log for sparc
build.log.xz (1.15.4)

Description ernsteiswuerfel archtester 2018-12-08 00:31:19 UTC
Created attachment 557296 [details]
build.log.xz

There are 20 KNOWNFAIL, this one is not:

======================================================================
FAIL: numpy.core.tests.test_arrayprint.TestComplexArray.test_str
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/numpy-1.14.5/work/numpy-1.14.5-python2_7/test/lib/numpy/core/tests/test_arrayprint.py", line 201, in test_str
    assert_equal(res, val)
  File "/var/tmp/portage/dev-python/numpy-1.14.5/work/numpy-1.14.5-python2_7/test/lib/numpy/testing/nose_tools/utils.py", line 411, in assert_equal
    raise AssertionError(msg)
AssertionError: 
Items are not equal:
 ACTUAL: '[0.0.j]'
 DESIRED: '[0.+0.j]'

[...]

Ran 7027 tests in 308.421s

FAILED (KNOWNFAIL=20, SKIP=25, failures=21)
Running unit tests for numpy
NumPy version 1.14.5
NumPy relaxed strides checking option: True
NumPy is installed in /var/tmp/portage/dev-python/numpy-1.14.5/work/numpy-1.14.5-python2_7/test/lib/numpy
Python version 2.7.15 (default, Oct  9 2018, 13:47:17) [GCC 7.3.0]
nose version 1.3.7
Comment 1 ernsteiswuerfel archtester 2018-12-08 00:32:09 UTC
Created attachment 557298 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2018-12-08 00:50:39 UTC
Created attachment 557300 [details]
build.log.xz (1.10.4)

Ok, actually it looks like 1.14.5 (one test failure) is an improvement over 1.10.4 (two test failures):

[...]
test_argmin_unicode (test_multiarray.TestArgmin) ... FAIL
test_kind.TestKind.test_all ... FAIL
[...]
Ran 6152 tests in 142.439s

FAILED (KNOWNFAIL=6, SKIP=5, failures=2)
Running unit tests for numpy
NumPy version 1.10.4
NumPy relaxed strides checking option: False
NumPy is installed in /var/tmp/portage/dev-python/numpy-1.10.4/work/numpy-1.10.4-python2_7/build/test/lib/numpy
Python version 2.7.15 (default, Oct  9 2018, 13:47:17) [GCC 7.3.0]
Comment 3 ernsteiswuerfel archtester 2018-12-08 01:02:02 UTC
Oops, I miscounted the 'not-known' failures. There are 21:

numpy.core.tests.test_arrayprint.TestComplexArray.test_str ... FAIL
Check formatting. ... FAIL
Check formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check inf/nan formatting of complex types. ... FAIL
Check formatting when using print ... FAIL
Check formatting when using print ... FAIL
numpy.core.tests.test_scalarprint.TestRealScalars.test_dragon4_interface ... FAIL
numpy.core.tests.test_scalarprint.TestRealScalars.test_str ... FAIL
numpy.ma.tests.test_core.TestMaskedArrayMethods.test_sort_flexible ... FAIL

So definitely not an improvement over 1.10.4.
Comment 4 Rolf Eike Beer archtester 2019-01-01 11:14:48 UTC
sparc has these and more:

FAIL: numpy.core.tests.test_arrayprint.TestComplexArray.test_str
FAIL: numpy.core.tests.test_longdouble.test_repr_roundtrip
FAIL: Check formatting.
FAIL: Check formatting of nan & inf.
FAIL: Check formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check inf/nan formatting of complex types.
FAIL: Check formatting when using print
FAIL: Check formatting when using print
FAIL: numpy.core.tests.test_print.test_locale_longdouble
FAIL: numpy.core.tests.test_scalarprint.TestRealScalars.test_dragon4_interface
FAIL: numpy.core.tests.test_scalarprint.TestRealScalars.test_str
FAIL: numpy.f2py.tests.test_kind.TestKind.test_all
FAIL: numpy.ma.tests.test_core.TestMaskedArrayMethods.test_sort_flexible
FAILED (KNOWNFAIL=19, SKIP=15, failures=24)
Comment 5 Rolf Eike Beer archtester 2019-01-01 11:15:12 UTC
Created attachment 559326 [details]
build.log for sparc
Comment 6 ernsteiswuerfel archtester 2019-01-01 18:27:59 UTC
Thanks for taking it upstream!
Comment 7 Rolf Eike Beer archtester 2019-01-06 17:03:03 UTC
Please give the patch from https://github.com/numpy/numpy/pull/12671 a shot. The longdouble one is sparc "specific" (i.e. sparc is not in a list of platforms known to have 16 byte long double, fixed in https://github.com/numpy/numpy/pull/12672), but the other thing is a generic big endian failure as it looks like.
Comment 8 ernsteiswuerfel archtester 2019-01-10 22:00:44 UTC
(In reply to Rolf Eike Beer from comment #7)
> Please give the patch from https://github.com/numpy/numpy/pull/12671 a shot.
It does not apply, 'cause there is no test_structured_to_unstructured(self) in numpy/lib/tests/test_recfunctions.py.
Comment 9 ernsteiswuerfel archtester 2019-02-18 01:07:44 UTC
Created attachment 565688 [details]
build.log.xz (1.15.4)

Gave  a try which still is definately an improvement over previous versions. Only 2 tests failing:

[...]
numpy/f2py/tests/test_return_character.py::TestF77ReturnCharacter::test_all <- ../work/numpy-1.15.4-python3_6/test/lib/numpy/f2py/tests/test_return_character.py FAILED [ 37%]
numpy/f2py/tests/test_return_character.py::TestF90ReturnCharacter::test_all <- ../work/numpy-1.15.4-python3_6/test/lib/numpy/f2py/tests/test_return_character.py FAILED [ 37%]
[...]
=============================================== FAILURES ===============================================
___________________________________ TestF77ReturnCharacter.test_all ____________________________________

self = <numpy.f2py.tests.test_return_character.TestF77ReturnCharacter object at 0x3fff793dff60>

    @pytest.mark.slow
    def test_all(self):
        for name in "t0,t1,t5,s0,s1,s5,ss".split(","):
>           self.check_function(getattr(self.module, name))

name       = 't0'
self       = <numpy.f2py.tests.test_return_character.TestF77ReturnCharacter object at 0x3fff793dff60>

../work/numpy-1.15.4-python3_6/test/lib/numpy/f2py/tests/test_return_character.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <numpy.f2py.tests.test_return_character.TestF77ReturnCharacter object at 0x3fff793dff60>
t = <fortran t0>

    def check_function(self, t):
        tname = t.__doc__.split()[0]
        if tname in ['t0', 't1', 's0', 's1']:
            assert_(t(23) == b'2')
            r = t('ab')
            assert_(r == b'a', repr(r))
            r = t(array('ab'))
>           assert_(r == b'a', repr(r))
E           AssertionError: b' '

r          = b' '
self       = <numpy.f2py.tests.test_return_character.TestF77ReturnCharacter object at 0x3fff793dff60>
t          = <fortran t0>
tname      = 't0'

../work/numpy-1.15.4-python3_6/test/lib/numpy/f2py/tests/test_return_character.py:19: AssertionError
___________________________________ TestF90ReturnCharacter.test_all ____________________________________

self = <numpy.f2py.tests.test_return_character.TestF90ReturnCharacter object at 0x3fff793e9208>

    @pytest.mark.slow
    def test_all(self):
        for name in "t0,t1,t5,ts,s0,s1,s5,ss".split(","):
>           self.check_function(getattr(self.module.f90_return_char, name))

name       = 't0'
self       = <numpy.f2py.tests.test_return_character.TestF90ReturnCharacter object at 0x3fff793e9208>

../work/numpy-1.15.4-python3_6/test/lib/numpy/f2py/tests/test_return_character.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <numpy.f2py.tests.test_return_character.TestF90ReturnCharacter object at 0x3fff793e9208>
t = <fortran object>

    def check_function(self, t):
        tname = t.__doc__.split()[0]
        if tname in ['t0', 't1', 's0', 's1']:
            assert_(t(23) == b'2')
            r = t('ab')
            assert_(r == b'a', repr(r))
            r = t(array('ab'))
>           assert_(r == b'a', repr(r))
E           AssertionError: b' '

r          = b' '
self       = <numpy.f2py.tests.test_return_character.TestF90ReturnCharacter object at 0x3fff793e9208>
t          = <fortran object>
tname      = 't0'

../work/numpy-1.15.4-python3_6/test/lib/numpy/f2py/tests/test_return_character.py:19: AssertionError
============== 2 failed, 6549 passed, 28 skipped, 9 xfailed, 3 xpassed in 418.55 seconds ===============
Comment 10 ernsteiswuerfel archtester 2020-11-04 15:44:12 UTC
numpy-1.19.2 'passes' tests on ppc64 as they are disabled. Can this bug be closed?
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-29 00:29:08 UTC
(In reply to ernsteiswuerfel from comment #10)
> numpy-1.19.2 'passes' tests on ppc64 as they are disabled. Can this bug be
> closed?

Sure.