WIP: ci: a sanitizer lane for the checks that offer --sanitize #29
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!29
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:ci/sanitize-lane"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Eleven checks build the code they test with the address and undefined-behaviour sanitizers when given
--sanitize, but nothing ran them that way, so a use after free or an overflow in that code passes CI by luck.What changed
RUN_ALL_SANITIZE = ["--sanitize"], beside itsRUN_ALL_ARGS(test_low_vram_texture_mips.pydeclares["--sanitize", "address,undefined"], as its option takes the list). The eleven checks that declare it:test_dump_readback,test_image_view_retry,test_import_buffer_binding,test_low_vram_texture_mips,test_program_cache_cleanup,test_recording_admission,test_sampler_admission,test_texel_buffer_ownership,test_texture_staging_publication,test_vulkan_clear_mip,test_vulkan_copy_span.tests/run_all.pyreadsRUN_ALL_SANITIZEinread_declarations(inDECLARATIONS; checked like the others, a non-empty list of strings), and--sanitizeruns only the checks that declare it, with those arguments added inpython_check: no C++ unit tests, no byte-compile, and no--write-times. On Windows (without--no-skip) it skips them with the reason "the sanitizer lane runs on Linux": llvm-mingw's ASan is a DLL runtime, and the checks' Linux flags (-no-pie) stop clang there.tests/test_run_all_declarations.pycovers the declaration's shapes (a list;Trueor[]stop the run) and a run of the lane with one declaring check (given exactly its arguments) and one that isn't (not run)..github/workflows/source-regressions.ymlgets a Linux job, Sanitizer lane (ASan, UBSan), with the same pinned checkouts as the Python job (the source, Vulkan-Headers v1.4.345, Python 3.12, g++ and clang), runningpython -I -B tests/run_all.py --sanitize --strict.Flags and settings
None: no environment switch, menu row or ini key. The new
tests/run_all.py --sanitizeoption and theRUN_ALL_SANITIZEdeclaration are the test runner's, described above.Measurements
Nothing to measure in the game: the change is a test-runner option and a CI job, and no game or renderer code changes. What was run, on the GitHub version (NotRexed/Hookshot#2908):
run_all.py --sanitize --strict: 11 passed, 0 failed.tests/test_run_all_declarations.py: the declaration's shapes and the lane's run, as above.run_all.py, rebased on GitHub'smainof that day, Windows: 18 pass;test_spawn_emitfails the same way onmainthere.test_spawn_emitfails the same way on Longshot'smainon the same PC.Testing
Tested: the runs under Measurements (on the GitHub version) and the game-free checks this description names. Checked but not measured: the lane in the Linux container (11 passed).
Not tested: the CI job on Longshot: it is a GitHub Actions workflow and Forgejo has no runner yet. The lane's runs recorded are the Linux container's and Windows' (skipped there).
Needs other testers: None
Screenshots
Nothing on screen.
Risk and rollback
Only
run_all.py --sanitizeand the new CI job run the lane; a plainrun_all.pyruns the same checks with the same arguments as before. A malformedRUN_ALL_SANITIZEin a test stops the run with its file and line, as the other declarations do. On Longshot the job does not run at all until Forgejo has a runner. Reverting the commit is enough.Reviewer notes
Carried over from NotRexed/Hookshot#2908 with the move to Longshot: the same change on Longshot's
main, with its rename applied. Its review and discussion are there.The checks above were done on the GitHub version; this branch is the same change with the rename applied (the same files and line counts). Forgejo runs no checks, and the lane is a GitHub Actions workflow that Forgejo has no runner for yet: on Longshot,
tests/run_all.py --sanitizeruns it locally. Only the checks that read the changed files were run, not the whole suite. The dev-loop proposal's D3 (NotRexed/Hookshot#2636).Issues
None on Longshot. See NotRexed/Hookshot#2636 (D3).
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run.MKWVK_API_VERSIONbumped (gpu/vk/vk_api.h'sMkwVkHostorMkwVkRendererchanged).mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
ci: a sanitizer lane for the checks that offer --sanitizeto WIP: ci: a sanitizer lane for the checks that offer --sanitizeBack to WIP under #48's process: this was carried over before the new template. Its description will be brought to the template and measured on Longshot (main against this PR, at named commits) when it's wanted for review; ask here if you'd like it sooner.
Description brought to Longshot's PR template (#48). Still WIP: its numbers are from the GitHub version, and it isn't rebased on current main; it gets measured on Longshot (main against this PR, at named commits) before it is marked ready.
Description moved to the template's Testing section and whole checklist (#72): what was tested, what wasn't, and what needs other testers (their test requests to open while this is WIP).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.