GeezerVison is showing github.com — GH-104584: Fix test_capi.test_counter_optimizer() when run twice by vstinner · Pull Request #106171 · python/cpython
Conversation
vstinner
commented
Jun 28, 2023
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
test_counter_optimizer() and test_long_loop() of test_capi now create a new function at each call. Otherwise, the optimizer counters are not the expected values when the test is run more than once.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
test_counter_optimizer() and test_long_loop() of test_capi now create
a new function at each call. Otherwise, the optimizer counters are
not the expected values when the test is run more than once.
|
test_capi currently fails on the Refleaks buildbots:
0:45:19 load avg: 1.15 Re-running test_capi in verbose mode (matching: test_counter_optimizer, test_long_loop)
beginning 6 repetitions
123456
test_counter_optimizer (test.test_capi.test_misc.TestOptimizerAPI.test_counter_optimizer) ... ok
test_long_loop (test.test_capi.test_misc.TestOptimizerAPI.test_long_loop)
Check that we aren't confused by EXTENDED_ARG ... ok
----------------------------------------------------------------------
Ran 2 tests in 0.001s
OK
test_counter_optimizer (test.test_capi.test_misc.TestOptimizerAPI.test_counter_optimizer) ... FAIL
test_long_loop (test.test_capi.test_misc.TestOptimizerAPI.test_long_loop)
Check that we aren't confused by EXTENDED_ARG ... FAIL
======================================================================
FAIL: test_counter_optimizer (test.test_capi.test_misc.TestOptimizerAPI.test_counter_optimizer)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_capi/test_misc.py", line 2386, in test_counter_optimizer
self.assertEqual(opt.get_count(), 1000)
AssertionError: 0 != 1000
======================================================================
FAIL: test_long_loop (test.test_capi.test_misc.TestOptimizerAPI.test_long_loop)
Check that we aren't confused by EXTENDED_ARG
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_capi/test_misc.py", line 2408, in test_long_loop
self.assertEqual(opt.get_count(), 10)
AssertionError: 0 != 10
----------------------------------------------------------------------
Ran 2 tests in 0.005s
FAILED (failures=2)
.test test_capi failed
cc @markshannon
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
vstinner
commented
Jun 28, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Reproduce the issue with: ./python -m test -m test_counter_optimizer -m test_long_loop -v test_capi test_capi command.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Note: Python 3.12 is not affected.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.