Skip to content

bpo-36611: Fix test_sys.test_getallocatedblocks()#12797

Merged
vstinner merged 1 commit intopython:masterfrom
vstinner:fix_test_getallocatedblocks
Apr 12, 2019
Merged

bpo-36611: Fix test_sys.test_getallocatedblocks()#12797
vstinner merged 1 commit intopython:masterfrom
vstinner:fix_test_getallocatedblocks

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Apr 12, 2019

Fix test_sys.test_getallocatedblocks() when tracemalloc is used: if
the name of Python memory allocators cannot get read, consider that
pymalloc is disabled.

Fix the following test:

./python -X tracemalloc -m test test_sys -m test_getallocatedblocks

https://bugs.python.org/issue36611

Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
If the name of Python memory allocators cannot get read, consider
that pymalloc is disabled.

Fix the following error:

./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks

ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
    alloc_name = _testcapi.pymem_getallocatorsname()
RuntimeError: cannot get allocators name
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 12, 2019
Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
If the name of Python memory allocators cannot get read, consider
that pymalloc is disabled.

Fix the following error:

./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks

ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
    alloc_name = _testcapi.pymem_getallocatorsname()
RuntimeError: cannot get allocators name
(cherry picked from commit 9b8314c)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
@bedevere-bot
Copy link
Copy Markdown

GH-12801 is a backport of this pull request to the 3.7 branch.

@vstinner vstinner deleted the fix_test_getallocatedblocks branch April 12, 2019 13:15
miss-islington added a commit that referenced this pull request Apr 12, 2019
Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
If the name of Python memory allocators cannot get read, consider
that pymalloc is disabled.

Fix the following error:

./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks

ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
    alloc_name = _testcapi.pymem_getallocatorsname()
RuntimeError: cannot get allocators name
(cherry picked from commit 9b8314c)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants