Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gh-68141: Guard test_mmap.LargeMmapTests.* with a timeout #101774

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

arhadthedev
Copy link
Member

@arhadthedev arhadthedev commented Feb 10, 2023

Some file systems don't support sparse files required by test_mmap to work with huge sizes in theory only, without extremely long and likely unsuccessful initialization of disc space.

Currently test_mmap.LargeMmapTests._make_test_file() assumes that sparse files are unsupported on Windows and macOS but always supported on Linux. However, filesystems like ZFS available on Linux break this assumption. As a result, we should rely on difference in duration of initialization between a single sector for sparse files and many gigabytes for non-sparse files.

Since SHORT_TIMEOUT can be changed with --timeout, we should put a really short bar enough for 4KB page to be written even in the worst case of process management and antivirus scan (like min(SHORT_TIMEOUT, 5.0)).

@arhadthedev arhadthedev added performance Performance or resource usage tests Tests in the Lib/test dir labels Feb 10, 2023
@arhadthedev
Copy link
Member Author

Looking for a way to force-abort a worker in ThreadPoolExecutor on timeout.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
awaiting review performance Performance or resource usage tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants