← 返回首页
gh-101101: Fix test_code_extra to reset value for refleak test by corona10 · Pull Request #102350 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-101101: Fix test_code_extra to reset value for refleak test#102350

Merged
corona10 merged 2 commits into
python:mainfrom
corona10:gh-101101-fix
Mar 2, 2023
Merged

gh-101101: Fix test_code_extra to reset value for refleak test#102350
corona10 merged 2 commits into
python:mainfrom
corona10:gh-101101-fix

Conversation

corona10 commented Mar 1, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

corona10 requested a review from encukou March 1, 2023 06:58
bedevere-bot mentioned this pull request Mar 1, 2023
13 tasks
corona10 added skip news 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section labels Mar 1, 2023

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @corona10 for commit dcb4d94 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Mar 1, 2023

corona10 commented Mar 1, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

With out this patch:

➜ cpython git:(main) ✗ ./python.exe -m test test_capi -R 3:3 Raised RLIMIT_NOFILE: 256 -> 1024 0:00:00 load avg: 3.41 Run tests sequentially 0:00:00 load avg: 3.41 [1/1] test_capi beginning 6 repetitions 123456 .Assertion failed: (extra == NULL), function test_code_extra, file code.c, line 82. Fatal Python error: Aborted Current thread 0x0000000104ba8580 (most recent call first): File "/Users/user/oss/cpython/Lib/unittest/case.py", line 579 in _callTestMethod File "/Users/user/oss/cpython/Lib/unittest/case.py", line 623 in run File "/Users/user/oss/cpython/Lib/unittest/case.py", line 678 in __call__ File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 122 in run File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 122 in run File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 122 in run File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 122 in run File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 122 in run File "/Users/user/oss/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/Users/user/oss/cpython/Lib/test/support/testresult.py", line 140 in run File "/Users/user/oss/cpython/Lib/test/support/__init__.py", line 1104 in _run_suite File "/Users/user/oss/cpython/Lib/test/support/__init__.py", line 1230 in run_unittest File "/Users/user/oss/cpython/Lib/test/libregrtest/runtest.py", line 281 in _test_module File "/Users/user/oss/cpython/Lib/test/libregrtest/refleak.py", line 89 in dash_R File "/Users/user/oss/cpython/Lib/test/libregrtest/runtest.py", line 315 in _runtest_inner2 File "/Users/user/oss/cpython/Lib/test/libregrtest/runtest.py", line 360 in _runtest_inner File "/Users/user/oss/cpython/Lib/test/libregrtest/runtest.py", line 235 in _runtest File "/Users/user/oss/cpython/Lib/test/libregrtest/runtest.py", line 265 in runtest File "/Users/user/oss/cpython/Lib/test/libregrtest/main.py", line 456 in run_tests_sequential File "/Users/user/oss/cpython/Lib/test/libregrtest/main.py", line 574 in run_tests File "/Users/user/oss/cpython/Lib/test/libregrtest/main.py", line 752 in _main File "/Users/user/oss/cpython/Lib/test/libregrtest/main.py", line 711 in main File "/Users/user/oss/cpython/Lib/test/libregrtest/main.py", line 775 in main File "/Users/user/oss/cpython/Lib/test/__main__.py", line 2 in <module> File "/Users/user/oss/cpython/Lib/runpy.py", line 88 in _run_code File "/Users/user/oss/cpython/Lib/runpy.py", line 198 in _run_module_as_main Extension modules: _testcapi, _testmultiphase, _testsinglephase, _testinternalcapi (total: 4) [1] 83285 abort ./python.exe -m test test_capi -R 3:3

corona10 commented Mar 1, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

buildbot/s390x RHEL7 Refleaks PR

Unrelated to this PR.

Issue created to: #102351

corona10 requested a review from erlend-aasland March 2, 2023 02:59

erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Small nit to make the comment slightly clearer. Perhaps also add code to assert that we could successfully revert to the initial value?

Comment thread Modules/_testcapi/code.c Outdated Show resolved Hide resolved
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>

encukou commented Mar 2, 2023

Copy link
Copy Markdown
Member

Ah, that's right. The test needs to clean up after itself so it can be run again.
Thank you for the fix!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants

Footer

© 2026 GitHub, Inc.