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

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

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Mar 1, 2023

@corona10 corona10 requested a review from encukou March 1, 2023 06:58
@corona10 corona10 added skip news 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section labels Mar 1, 2023
@bedevere-bot
Copy link

🤖 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 bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Mar 1, 2023
@corona10
Copy link
Member Author

corona10 commented Mar 1, 2023

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
Copy link
Member Author

corona10 commented Mar 1, 2023

buildbot/s390x RHEL7 Refleaks PR

Unrelated to this PR.

Issue created to: #102351

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

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

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

encukou commented Mar 2, 2023

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

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