]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-127076: Ignore memory mmap in FileIO testing (#127088)
authorCody Maloney <cmaloney@users.noreply.github.com>
Fri, 22 Nov 2024 14:55:32 +0000 (06:55 -0800)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 14:55:32 +0000 (15:55 +0100)
commit46f8a7bbdbb02cafaa00f7bb9478d3d27affc57a
treee1bce0ce52eebcb27f91431597ae7f7bf7b37867
parent0a1944cda8504ba0478a51075eba540576570336
gh-127076: Ignore memory mmap in FileIO testing (#127088)

`mmap`, `munmap`, and `mprotect` are used by CPython for memory
management, which may occur in the middle of the FileIO tests. The
system calls can also be used with files, so `strace` includes them
in its `%file` and `%desc` filters.

Filter out the `mmap` system calls related to memory allocation for the
file tests. Currently FileIO doesn't do `mmap` at all, so didn't add
code to track from `mmap` through `munmap` since it wouldn't be used.
For now if an `mmap` on a fd happens, the call will be included (which
may cause test to fail), and at that time support for tracking the
address throug `munmap` could be added.
Lib/test/support/strace_helper.py
Lib/test/test_fileio.py
Misc/NEWS.d/next/Tests/2024-11-20-18-49-01.gh-issue-127076.DHnXxo.rst [new file with mode: 0644]