tests: Mark tests as unsafe or limit number of threads.#2229
Open
seberg wants to merge 4 commits into
Open
Conversation
- thread_unsafe: nvml init ref-count, graphMem attr, mock-based tests, OpenGL, peer-access pool state, multiprocessing warning, program-cache race reproduction, and functools.cache mutation tests - parallel_threads_limit: IPC / worker-pool tests that spawn subprocesses or open file descriptors (limit 4), example tests (limit 8), and the event-registration test whose timeouts are slow Signed-off-by: Sebastian Berg <sebastianb@nvidia.com>
Contributor
seberg
commented
Jun 16, 2026
| assert len(read_counters) == 5 | ||
|
|
||
|
|
||
| @pytest.mark.thread_unsafe(reason="API appears to be thread-unsafe (2026-06)") |
Contributor
Author
There was a problem hiding this comment.
This felt fine to me, as it writes the counter but if it doesn't seem good it could be an upstream issue. (CI ran into a segfault, IIRC.)
|
|
||
|
|
||
| @pytest.mark.usefixtures("clear_find_binary_cache") | ||
| @pytest.mark.thread_unsafe(reason="functools.cache may replace entry.") |
Contributor
Author
There was a problem hiding this comment.
This tests identity on Path objects, which isn't a given with functools.cache right now. But it felt harmless enough to just ignore here.
mdboom
approved these changes
Jun 16, 2026
|
|
||
|
|
||
| @pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows") | ||
| @pytest.mark.thread_unsafe(reason="nvml init affects other threads") |
Contributor
Author
|
/ok to test 1f7783f |
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is straight forward (but that doesn't mean we may not want to skip some of) and does two things:
For thread-unsafe markers should sanity check if it looks like it should be thread-safe we may need either explicit tests or fix things.