Add ICD tests for the save image and export region path validation - #86
Draft
markccchiang wants to merge 5 commits into
Draft
Add ICD tests for the save image and export region path validation#86markccchiang wants to merge 5 commits into
markccchiang wants to merge 5 commits into
Conversation
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.
Description
Closes #55. The carta-backend PR #1378 added path validation to
Frame::SaveFileandRegionExporter::CanExportToFile, so that a save or an export can not destroy something that is already at the requested path.This adds two test files, one per message pair, which drive every refusal the backend can produce and assert the whole ack:
success,message, andoverwrite_confirmation_required.Known failure:
SAVE_IMAGE_OVERWRITEcase 2on macOSThis case currently fails on the macOS runners, and the failure is real — it is a backend defect, not a test problem.
Frame::SaveFilecompares the requested output path against the name of the open file, but the open file's name has its symbolic links resolved, and the output path does not. Where /images is a symbolic link, the comparison never matches, the guard is skipped, and the backend overwrites the source image while reportingsuccess = true. The Linux runners are unaffected because apptainer bind mounts/images:/images, giving a real directory.Checklist
For the pull request:
(or no documentation changes are needed)