Skip to content

Fix certifier test permissions - #13473

Open
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:fix-certifier-test-permissions
Open

Fix certifier test permissions#13473
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:fix-certifier-test-permissions

Conversation

@bneradt

@bneradt bneradt commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Certifier tests fail in root-run CI because ATS cannot update the
copied serial file or certificate store. Local owner-run tests mask the
problem.

This problem is addressed in this patch by giving the unprivileged ATS
process the required access to the serial file and certificate store in
each certifier scenario.

Certifier tests fail in root-run CI because ATS cannot update the
copied serial file or certificate store. Local owner-run tests mask the
problem.

This problem is addressed in this patch by giving the unprivileged ATS
process the required access to the serial file and certificate store in
each certifier scenario.
Copilot AI review requested due to automatic review settings August 1, 2026 19:56
@bneradt bneradt added this to the 11.0.0 milestone Aug 1, 2026
@bneradt bneradt self-assigned this Aug 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the certifier gold tests to avoid permission failures when the CI harness runs as root but the ATS process runs unprivileged, ensuring ATS can update the copied CA serial file and certificate store across all certifier scenarios.

Changes:

  • Creates explicit store_path and serial_path variables for each certifier scenario setup.
  • Adjusts permissions on the copied ca-serial.txt and the store/ directory to allow the unprivileged ATS process to write.
Suppressed comments (3)

tests/gold_tests/pluginTest/certifier/certifier.test.py:135

  • Using Setup.RunCommand with an unquoted shell command (and &&) is brittle: paths with spaces/shell metacharacters will break, and this needlessly invokes a shell. Prefer adjusting permissions via Python (os.chmod) in-process.
        Setup.RunCommand(f'chmod a+rw {serial_path} && chmod a+rwx {store_path}')

tests/gold_tests/pluginTest/certifier/certifier.test.py:195

  • Using Setup.RunCommand with an unquoted shell command (and &&) is brittle: paths with spaces/shell metacharacters will break, and this needlessly invokes a shell. Prefer adjusting permissions via Python (os.chmod) in-process.
        Setup.RunCommand(f'chmod a+rw {serial_path} && chmod a+rwx {store_path}')

tests/gold_tests/pluginTest/certifier/certifier.test.py:261

  • Using Setup.RunCommand with an unquoted shell command (and &&) is brittle: paths with spaces/shell metacharacters will break, and this needlessly invokes a shell. Prefer adjusting permissions via Python (os.chmod) in-process.
        Setup.RunCommand(f'chmod a+rw {serial_path} && chmod a+rwx {store_path}')

Comment thread tests/gold_tests/pluginTest/certifier/certifier.test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants