Skip to content

camera_calibration_parsers: allow reading read-only INI files - #431

Open
ktyang512 wants to merge 1 commit into
ros-perception:rollingfrom
ktyang512:fix/read-only-ini-397
Open

camera_calibration_parsers: allow reading read-only INI files#431
ktyang512 wants to merge 1 commit into
ros-perception:rollingfrom
ktyang512:fix/read-only-ini-397

Conversation

@ktyang512

Copy link
Copy Markdown

Summary

  • open calibration INI files with std::ifstream so reading does not require write permission
  • add a cross-platform regression test for valid read-only calibration files
  • restore the original file permissions or attributes during test cleanup

Fixes #397.

Testing

  • reproduced the failure with the original std::fstream implementation
  • camera_calibration_parsers-parse_ini: 7 tests passed, including the read-only regression under an ordinary Linux user
  • independent read-only INI reproducer passed
  • ROS Rolling package build and test in an Ubuntu Resolute container: 78 tests, 0 errors, 0 failures, 12 skipped
  • ament_uncrustify and ament_cpplint passed for both changed files
  • git diff --check passed

The read-only test performs a capability probe and skips when the test process can still open the file read/write, such as a privileged root container. The regression executed without skipping under the host ordinary user. Native Windows and macOS execution are left to CI.

Generative tool disclosure

Generated-by: OpenAI Codex (GPT-5)

Open calibration INI files with std::ifstream so read access does not require write permission. Add cross-platform regression coverage for read-only files.

Generated-by: OpenAI Codex (GPT-5)
Signed-off-by: ktyang512 <ktyang512@gmail.com>
@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Function camera_calibration_parser::readCalibrationIni() fails if the INI file is read-only

1 participant