Skip to content

nplb: Skip hard link tests where link() is forbidden - #13270

Merged
sacuff merged 1 commit into
youtube:mainfrom
hferreiro:nplb-hardlink
Oct 9, 2026
Merged

sacuff merged 1 commit into
youtube:mainfrom
hferreiro:nplb-hardlink

Conversation

@hferreiro

Copy link
Copy Markdown
Collaborator

PosixLinkTest.SuccessfulCreation and PosixFileGetInfoTest.ReportsHardLinkCount need link() to succeed, but Android's SELinux policy denies apps the link permission on their own data files, so on AOSP link() fails with EACCES and both tests were excluded.

Skip when link() fails with EACCES and remove both tests from the AOSP filters.

Bug: 532068409

PosixLinkTest.SuccessfulCreation and PosixFileGetInfoTest.ReportsHardLinkCount
need link() to succeed, but Android's SELinux policy denies apps the link
permission on their own data files, so on AOSP link() fails with EACCES and
both tests were excluded.

Skip when link() fails with EACCES and remove both tests from the AOSP
filters.

Bug: 532068409
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor
Context State Description
CI / All Pass ⏳ PENDING Checks are running
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


starboard: Skip hard link tests when forbidden

Android's SELinux policy prevents apps from using link() on their own
data files, resulting in EACCES. Previously, these tests were
excluded in platform-specific filters to avoid failures.

Update the NPLB POSIX compliance tests to check for the EACCES error
code and skip the test instead of failing. This allows removing the
explicit test exclusions from the AOSP filters, making the test suite
more robust across environments with different security policies.

Bug: 532068409

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the POSIX compliance tests PosixFileGetInfoTest.ReportsHardLinkCount and PosixLinkTest.SuccessfulCreation to gracefully skip when hard links are not permitted (returning EACCES), which is common under Android's SELinux policy. Consequently, these tests are re-enabled by removing them from the Evergreen ARM and ARM64 AOSP test filters. The review feedback recommends adhering to the Chromium C++ style guide by using C++ standard library headers (<cerrno> and <cstring>) instead of C-style headers, and prefixing standard library functions like strerror with the std:: namespace.

@hferreiro
hferreiro requested a review from sacuff October 9, 2026 16:40
@sacuff
sacuff merged commit 6c0220c into youtube:main Oct 9, 2026
849 of 858 checks passed
@hferreiro
hferreiro deleted the nplb-hardlink branch October 9, 2026 21:04
briantting pushed a commit that referenced this pull request Oct 13, 2026
…bidden

Refer to original PR: #13270

PosixLinkTest.SuccessfulCreation and
PosixFileGetInfoTest.ReportsHardLinkCount need link() to succeed, but
Android's SELinux policy denies apps the link permission on their own
data files, so on AOSP link() fails with EACCES and both tests were
excluded.

Skip when link() fails with EACCES and remove both tests from the AOSP
filters.

Bug: 532068409

(cherry picked from commit 6c0220c)
briantting pushed a commit that referenced this pull request Oct 16, 2026
…bidden

Refer to original PR: #13270

PosixLinkTest.SuccessfulCreation and
PosixFileGetInfoTest.ReportsHardLinkCount need link() to succeed, but
Android's SELinux policy denies apps the link permission on their own
data files, so on AOSP link() fails with EACCES and both tests were
excluded.

Skip when link() fails with EACCES and remove both tests from the AOSP
filters.

Bug: 532068409

(cherry picked from commit 6c0220c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants