You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: fix find_skipped_tests.py parsing and remove stale CI markers - #3590
The "This test is not currently run in any CI job" markers (#3486) came from the report of toolshed/find_skipped_tests.py. The tool misread pytest output, so 14 markers sit on tests that do run in CI. This PR fixes the parser and removes those markers.
parse_log(job log)
- result regex "tests/\S+::\S+ OUTCOME" # truncates ids with spaces, drops their PASSED lines- suite from step name # every "run-tests bindings" step -> cuda_bindings_13- any line containing SKIPPED -> skipped # records the truncated ids+ suite from pytest's "rootdir:" line # cuda_bindings_12 / _13, cuda_core, cuda_pathfinder+ ignore sessions outside cuda-python packages # e.g. numba-cuda's own suite in nightly CI+ result regex accepts spaces in ids, "PARALLEL", progress markers,+ interleaved free-threaded output, several results per line+ ignore [NOTSET] (empty parameter set)
report
+ read only scheduled nightly runs (not manual dispatches)+ warn about jobs where pytest never ran
Because results are now tagged with their bindings root, a CUDA 12 test can no longer be hidden by its CUDA 13 twin passing, or the reverse.
Markers removed, because each test runs in at least one CI configuration (per-marker job links in #3562):
test_device_get_memory_affinity and test_device_get_cpu_affinity_within_scope (cuda_bindings_12 and cuda_bindings_13)
test_replace_address_accepts_managed_buffer_on_nonzero_device and test_from_tiled_accepts_managed_buffer_on_nonzero_device
test_numa_node_id
test_ml_dtypes_bfloat16_torch_dlpack and test_torch_tensor_bridge_dtypes
the [NOTSET] markers in cuda_core/tests/test_utils.py
customPyTorchKernel, fftSignalAnalysis, and numpyVsCupy, removed from the scope of the test_sample marker; its other 17 samples still never run
test_always_skip in cuda_bindings_13/tests/test_cuda.py stays, now commented as the tool's canary. The unused copy in cuda_bindings_13/tests/legacy_api/ is deleted.
Bindings roots: I checked the cuda_bindings_12 counterparts. Its affinity and nvlink-capability markers are removed here as well. cuda_bindings_12 has no test_always_skip and no legacy_api copy, and its test_graphics_api_smoketest marker stays because that test still never runs (#3575).
Evidence
Before: the tool's 2026-11-17 report in EPIC: Tests that never run in CI #2077 lists, for example, test_device_get_memory_affinity[<AffinityScope.NODE: (truncated), although that test passes on 20 Linux configurations.
After: the fixed tool reports 147 tests skipped in every configuration, run against the latest main CI run (45634430012) and the latest scheduled nightly (45532608245). None of them is a test whose marker this PR removes, and none has a truncated or malformed id.
Parser check: across 25 real CI job logs (about 7,700 test ids, 16 of the logs from free-threaded jobs), the new parser produces no malformed ids.
To confirm, run the tool and check that none of the tests above appear:
Several of the de-marked tests run only in nightly CI (the torch tests, test_numa_node_id, and the three samples). #3562 links the nightly jobs where they pass.
Merge Danger
Door: two-way. Only test comments, one no-op test, and a developer script change; nothing in the packages or CI workflows does.
Blast Radius: none. No runtime or CI behavior changes. The tool's report format changes slightly: test ids now carry their package directory.
Reviewers: please feel free to push commits directly to this PR to improve it.
toolshed/find_skipped_tests.py misread pytest output, so the skip list
that the "not currently run in any CI job" markers (NVIDIA#3486) came from
included tests that do run in CI:
- node ids containing spaces were truncated, and their PASSED lines
were dropped;
- pytest-run-parallel ("PARALLEL PASSED") and interleaved free-threaded
output was not recognized;
- results from both bindings roots were filed under cuda_bindings_13, so
a test passing in one root hid the same test never running in the other;
- the nightly run could be a manual dispatch, and jobs where pytest never
started were not reported.
Attribute results to the package of the pytest session's rootdir, accept
the output shapes CI actually produces, ignore third-party suites and
[NOTSET] ids, read only scheduled nightly runs, and warn about jobs where
pytest never ran. Return job logs directly instead of round-tripping them
through temporary files.
Remove the markers on tests that run in at least one CI configuration.
Keep test_always_skip in cuda_bindings_13/tests/test_cuda.py as the tool's
canary, and delete the unused copy in legacy_api.
ClosesNVIDIA#3562
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Updated CI test reporting to compare skipped and passing results across active configurations, while ignoring empty-parameter-set results.
Reports now flag jobs without a pytest session and verify that the expected skipped-test canary appears.
Removed an always-skipped legacy test and outdated comments about tests not running in CI.
Updated the documented list of serialized sample keys.
The skipped-test tool now selects specific CI runs, parses pytest outcomes by package and session, and reports tests skipped across active configurations. The PR also removes or revises CI comments on tests and identifies an always-skipped test as the tool’s canary.
Changes: Skipped-test detection
Layer / File(s)
Summary
CI run and log collection toolshed/find_skipped_tests.py
The tool filters nightly runs by event type, retains job names, and fetches logs through the API with a gh run view fallback.
Session parsing and outcome aggregation toolshed/find_skipped_tests.py
The parser tracks pytest sessions, qualifies test IDs by package, ignores empty parameter sets, and aggregates skipped and non-skipped outcomes across active configurations.
Report, canary, and test annotations toolshed/find_skipped_tests.py, cuda_bindings_12/tests/nvml/test_pynvml.py, cuda_bindings_13/tests/legacy_api/test_legacy_cuda.py, cuda_bindings_13/tests/nvml/test_pynvml.py, cuda_bindings_13/tests/test_cuda.py, cuda_bindings_13/tests/test_graphics_apis.py, cuda_core/tests/example_tests/test_samples.py, cuda_core/tests/system/test_system_device.py, cuda_core/tests/test_object_protocols.py, cuda_core/tests/test_tensor_map.py, cuda_core/tests/test_utils.py
The report includes jobs without pytest sessions and checks the package-qualified canary. The PR removes stale CI comments, updates the sample-key list, and removes the redundant always-skipped test from the legacy API suite.
Assessment against linked issues
Objective
Addressed
Explanation
Fix parsing of spaced test IDs, parallel outcomes, and subtest outcomes; ignore empty parameter sets. [3562]
✅
Report configurations or jobs that produce no pytest output and avoid treating missing output as test results. [3562]
✅
Remove stale CI markers and retain or identify the canary. [3562]
✅
Add unit tests with sample log lines for each required outcome format. [3562]
❌
No parser unit tests or sample log cases are included in the supplied changes.
Possibly related issues
NVIDIA/cuda-python issue 2077: The PR updates skipped-test parsing and removes stale “not run in CI” annotations, which are part of the epic’s stated scope.
NVIDIA/cuda-python issue 3578: The PR removes three sample keys from the comment’s list while retaining the marker for the remaining samples. The changes align the comment with the subset identified as passing. <fixed_issue_severity>Medium</fixed_issue_severity>
Suggested reviewers:rwgk, jpascucci-nv
Change: Bug fix
Merge Risk: Low · up to c6f45
This updates a CI skipped-test reporting tool and removes stale "not run in CI" comments from tests. The tool has a few diagnostic gaps: a fallback log fetch that ignores the selected repository, missing warnings when no pytest ran anywhere, and a rare parsing edge case. The three de-marked samples are not verified automatically as having run. None of this affects shipped code, so the merge risk is low, and the gaps are worth fixing or acknowledging.
Security architecture risk: Minimal · up to c6f45
The script changes which CI logs it reads and how it reports skipped tests. It still uses the operator’s existing GitHub access, and its report is not wired into a CI gate in this repository.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Minor comments: 1
toolshed/find_skipped_tests.py: 1
59-60: Minor · Functional Correctness · Poor tradeoff
suggestion: Do not match outcome words inside parameter IDs.
After a session root is recognized, PYTEST_RESULT can match an outcome word inside a parameter ID. For example, tests/test_x.py::test_case[foo PASSED bar] SKIPPED records tests/test_x.py::test_case[foo as PASSED. The complete skipped test is not recorded as skipped.
This needs a parameter ID that contains a whitespace-delimited outcome word. The search of the available cuda_core sources found no such ID. The cuda_bindings sources are not in this checkout, so that package remains unchecked. Treat this as an edge case rather than a current report error.
Identify the complete node ID before reading an outcome. Include this case in the tests for IDs with spaces and interleaved output.
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
important: Add a positive CI check for the three samples whose markers are removed.
This change removes the "not currently run in any CI job" marker from customPyTorchKernel, fftSignalAnalysis, and numpyVsCupy. The updated toolshed/find_skipped_tests.py cannot show that these samples ran. universally_skipped returns ever_skipped - ever_non_skipped, and build_summary lists only that set. A sample that never produces a pytest outcome line appears in neither set, so it is not reported. The new warnings cover missing logs and jobs without pytest. They do not report per-test results. The suggested check therefore shows only that a sample is absent from the skipped list. That does not show that the sample ran.
test_sample can also skip a collected sample when no GPU is detected or when run_sample returns WAIVED. Collection alone does not prove execution.
Linked issue #3562 requires an automated way to verify that affected tests run in at least one CI configuration. Add a check that requires a non-skipped result for each of these three samples in at least one configuration. Until such a check exists, the removed markers rely on manual CI observation.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
important: Preserve the repository in the fallback request.
If the API request fails, the fallback omits repo. When --repo differs from the CLI default, this request cannot reliably retrieve the selected repository's logs. Pass --repo, repo to gh run view; that command supports an explicit repository override. (cli.github.com)
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
This comment is about lines 355-357, outside the diff; it is anchored on the nearest change, line 359.
important: Emit job warnings before the no-activity return.
If every fetched job log lacks a pytest session, analyze_config records the job names, but this return bypasses all new warning sections. The report gives no affected configuration or job names.
Emit the diagnostic sections before this return. Keep the short no-activity result, but include the collected setup-failure details.
The reason will be displayed to describe this comment to others. Learn more.
Sol 6.1 High has some comments (as did CodeRabbit, I'm not sure they're as cogent), but other than that it looks okay to me:
[P2] Missing required parser regression tests. The PR rewrites parse_log without adding automated tests. Issue #3562 explicitly requires fixtures covering spaced IDs, PARALLEL results, and subtest outcomes. Add these to the CI tools test suite.
[P3] The no-activity return hides setup-failure diagnostics. In build_summary, the early return precedes the new warning sections. When every configuration fails before pytest, the report omits the recorded job names. I reproduced this; emit the diagnostics before returning.
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
cuda.bindingsEverything related to the cuda.bindings modulecuda.coreEverything related to the cuda.core moduletestImprovements or additions to tests
2 participants
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.
Closes #3562. Part of #2077.
Summary
The "This test is not currently run in any CI job" markers (#3486) came from the report of
toolshed/find_skipped_tests.py. The tool misread pytest output, so 14 markers sit on tests that do run in CI. This PR fixes the parser and removes those markers.Because results are now tagged with their bindings root, a CUDA 12 test can no longer be hidden by its CUDA 13 twin passing, or the reverse.
Markers removed, because each test runs in at least one CI configuration (per-marker job links in #3562):
test_device_get_memory_affinityandtest_device_get_cpu_affinity_within_scope(cuda_bindings_12andcuda_bindings_13)test_device_get_nvlink_capability(cuda_bindings_12)test_cuda_gl_register_image_smoketest(cuda_bindings_13)test_repr_formattest_replace_address_accepts_managed_buffer_on_nonzero_deviceandtest_from_tiled_accepts_managed_buffer_on_nonzero_devicetest_numa_node_idtest_ml_dtypes_bfloat16_torch_dlpackandtest_torch_tensor_bridge_dtypes[NOTSET]markers incuda_core/tests/test_utils.pycustomPyTorchKernel,fftSignalAnalysis, andnumpyVsCupy, removed from the scope of thetest_samplemarker; its other 17 samples still never runtest_always_skipincuda_bindings_13/tests/test_cuda.pystays, now commented as the tool's canary. The unused copy incuda_bindings_13/tests/legacy_api/is deleted.Bindings roots: I checked the
cuda_bindings_12counterparts. Its affinity and nvlink-capability markers are removed here as well.cuda_bindings_12has notest_always_skipand nolegacy_apicopy, and itstest_graphics_api_smoketestmarker stays because that test still never runs (#3575).Evidence
test_device_get_memory_affinity[<AffinityScope.NODE:(truncated), although that test passes on 20 Linux configurations.mainCI run (45634430012) and the latest scheduled nightly (45532608245). None of them is a test whose marker this PR removes, and none has a truncated or malformed id.To confirm, run the tool and check that none of the tests above appear:
Several of the de-marked tests run only in nightly CI (the torch tests,
test_numa_node_id, and the three samples). #3562 links the nightly jobs where they pass.Merge Danger
Door: two-way. Only test comments, one no-op test, and a developer script change; nothing in the packages or CI workflows does.
Blast Radius: none. No runtime or CI behavior changes. The tool's report format changes slightly: test ids now carry their package directory.
Reviewers: please feel free to push commits directly to this PR to improve it.
🤖 Generated with Claude Code