Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.6.2c1 fails to pass test_cmath on Solaris10 #49974

Closed
smontanaro opened this issue Apr 8, 2009 · 10 comments
Closed

2.6.2c1 fails to pass test_cmath on Solaris10 #49974

smontanaro opened this issue Apr 8, 2009 · 10 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@smontanaro
Copy link
Contributor

BPO 5724
Nosy @smontanaro, @warsaw, @mdickinson, @giampaolo
Files
  • issue5724.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mdickinson'
    closed_at = <Date 2009-05-04.13:59:22.028>
    created_at = <Date 2009-04-08.21:28:12.785>
    labels = ['type-bug', 'tests']
    title = '2.6.2c1 fails to pass test_cmath on Solaris10'
    updated_at = <Date 2009-05-04.13:59:22.024>
    user = 'https://github.com/smontanaro'

    bugs.python.org fields:

    activity = <Date 2009-05-04.13:59:22.024>
    actor = 'mark.dickinson'
    assignee = 'mark.dickinson'
    closed = True
    closed_date = <Date 2009-05-04.13:59:22.028>
    closer = 'mark.dickinson'
    components = ['Tests']
    creation = <Date 2009-04-08.21:28:12.785>
    creator = 'skip.montanaro'
    dependencies = []
    files = ['13670']
    hgrepos = []
    issue_num = 5724
    keywords = ['patch']
    message_count = 10.0
    messages = ['85784', '85789', '85844', '85847', '85848', '85858', '85860', '85947', '85948', '87127']
    nosy_count = 4.0
    nosy_names = ['skip.montanaro', 'barry', 'mark.dickinson', 'giampaolo.rodola']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5724'
    versions = ['Python 2.6']

    @smontanaro
    Copy link
    Contributor Author

    I configured and built Python 2.6.2c1 on Solaris 10 using gcc 4.2.
    All tests pass except cmath:

    % LD_LIBRARY_PATH=. ./python [Lib/test/regrtest.py](https://github.com/python/cpython/blob/main/Lib/test/regrtest.py) -v test_cmath
    

    test_cmath
    test_abs (test.test_cmath.CMathTests) ... ok
    test_cmath_matches_math (test.test_cmath.CMathTests) ... ok
    test_constants (test.test_cmath.CMathTests) ... ok
    test_input_type (test.test_cmath.CMathTests) ... ok
    test_isinf (test.test_cmath.CMathTests) ... ok
    test_isnan (test.test_cmath.CMathTests) ... ok
    test_phase (test.test_cmath.CMathTests) ... ok
    test_polar (test.test_cmath.CMathTests) ... ok
    test_rect (test.test_cmath.CMathTests) ... ok
    test_specific_values (test.test_cmath.CMathTests) ... FAIL
    test_user_object (test.test_cmath.CMathTests) ... ok

    \======================================================================
    FAIL: test_specific_values (test.test_cmath.CMathTests)
    \----------------------------------------------------------------------
    
        Traceback (most recent call last):
          File "/home/tuba/skipm/src/Python-2.6.2c1/Lib/test/test_cmath.py",
    line 338, in test_specific_values
    	self.fail('OverflowError not raised in test %s' % test_str)
        AssertionError: OverflowError not raised in test exp0052:
    exp(complex(710.0, 1.5))
    \----------------------------------------------------------------------
    Ran 11 tests in 0.048s
    
        FAILED (failures=1)
        test test_cmath failed -- Traceback (most recent call last):
          File "/home/tuba/skipm/src/Python-2.6.2c1/Lib/test/test_cmath.py",
    line 338, in test_specific_values
    	self.fail('OverflowError not raised in test %s' % test_str)
        AssertionError: OverflowError not raised in test exp0052:
    exp(complex(710.0, 1.5))
    1 test failed:
    test_cmath
    

    Since we are so close to release I'm assigning it to Barry, though
    Mark Dickinson is probably the best person to look at this problem. I
    think this is a long-standing Solaris/cmath issue. I'm sorry Mark and
    I didn't connect long enough at PyCon to dig into this. It may not be
    serious enough to hold up a final release, but I wanted to mention the
    problem so it's recognized.

    @smontanaro smontanaro added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Apr 8, 2009
    @warsaw
    Copy link
    Member

    warsaw commented Apr 9, 2009

    I'll mark this as a release blocker for 2.6.2 for now, until Mark weighs in.

    @mdickinson
    Copy link
    Member

    Sorry for the late reply: I've been away for a few days.

    This looks like the same problem as bpo-4575, so
    should already be fixed in the trunk and py3k. It
    looks as though I never got around to backporting the
    fix to 2.6 (or 3.0). I'll do that today.

    @mdickinson mdickinson assigned mdickinson and unassigned warsaw Apr 11, 2009
    @mdickinson
    Copy link
    Member

    Here's a patch that backports the corresponding changes from trunk.

    Skip, can you confirm that this fixes the issue?

    @mdickinson
    Copy link
    Member

    Just to say, I'm a bit uncomfortable with a patch this large going into a
    release candidate. It's all code that's been backported from 2.7, so it
    *should* be okay, but I really don't want to be responsible for breaking
    2.6.2.

    The test failure that Skip reports *is* due to a bug, but the bug is
    platform-specific (only affects x86 platforms where the math library
    doesn't have isinf or isnan---in practice, that's only Solaris/x86), and
    it's a bug in a somewhat obscure corner case (overflow in cmath.acosh)
    that's not likely to affect many people.

    I don't think the (small, I hope) risk of breaking a release candidate is
    worth the (even smaller, IMO) benefit from fixing this bug. If Skip
    confirms that the patch works, I'd suggest that it can wait for 2.6.3.

    Assigning back to Barry for pronouncement.

    @mdickinson mdickinson assigned warsaw and unassigned mdickinson Apr 11, 2009
    @smontanaro
    Copy link
    Contributor Author

    Mark> Here's a patch that backports the corresponding changes from
    Mark> trunk.

    Mark> Skip, can you confirm that this fixes the issue?
    

    Indeed, your patch appears to fix the problem:

    % LD_LIBRARY_PATH=. ./python [Lib/test/regrtest.py](https://github.com/python/cpython/blob/main/Lib/test/regrtest.py) -v test_cmath
    test_cmath
    test_abs (test.test_cmath.CMathTests) ... ok
    test_cmath_matches_math (test.test_cmath.CMathTests) ... ok
    test_constants (test.test_cmath.CMathTests) ... ok
    test_input_type (test.test_cmath.CMathTests) ... ok
    test_isinf (test.test_cmath.CMathTests) ... ok
    test_isnan (test.test_cmath.CMathTests) ... ok
    test_phase (test.test_cmath.CMathTests) ... ok
    test_polar (test.test_cmath.CMathTests) ... ok
    test_rect (test.test_cmath.CMathTests) ... ok
    test_specific_values (test.test_cmath.CMathTests) ... ok
    test_user_object (test.test_cmath.CMathTests) ... ok
    
    \----------------------------------------------------------------------
    Ran 11 tests in 0.063s
    
    OK
    1 test OK.
    

    I'll leave it to you and Barry to consider if the patch is too hefty for
    backport.

    Skip

    @smontanaro
    Copy link
    Contributor Author

    FWIW, with the patch applied all tests still pass on Mac OS X 10.5.6
    (Intel).

    S

    @warsaw
    Copy link
    Member

    warsaw commented Apr 13, 2009

    We'll omit this for 2.6.2. Mark, please feel free to apply it once
    2.6.2 is released so that it makes it into 2.6.3.

    @warsaw
    Copy link
    Member

    warsaw commented Apr 13, 2009

    Accepted for 2.6.3.

    @mdickinson mdickinson assigned mdickinson and unassigned warsaw May 3, 2009
    @mdickinson
    Copy link
    Member

    Applied in r72275. I've also applied the same changes to the
    release30-maint branch in r72277.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants