test(dentry_cache): accept both ESTALE and EIO errors in notifier tests#4789
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4789 +/- ##
==========================================
- Coverage 83.65% 0 -83.66%
==========================================
Files 168 0 -168
Lines 20823 0 -20823
==========================================
- Hits 17419 0 -17419
+ Misses 2753 0 -2753
+ Partials 651 0 -651
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the stability of FUSE dentry cache integration tests by broadening the error validation criteria. By allowing both ESTALE and EIO errors, the tests are now resilient to variations in how the FUSE kernel driver reports stale file handles across different operating system configurations. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the dentry cache integration tests to accommodate scenarios where the FUSE kernel driver translates ESTALE errors to EIO errors. It introduces a new validation helper, ValidateESTALEOrEIOError, and refactors existing validation helpers to use explicit string containment checks instead of regular expressions. The review feedback suggests leveraging the testify library's require.Contains and require.True assertions to simplify the manual error checks and make the test code more idiomatic.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the dentry cache integration tests to handle cases where the FUSE kernel driver translates ESTALE errors to EIO errors. It introduces a new helper function ValidateESTALEOrEIOError to validate either error type and updates existing error validation helpers to use require.Contains instead of assert.Regexp. I have no feedback to provide as there are no review comments.
Description
This PR resolves potential test failures and flakes in the FUSE dentry cache notifier integration tests.
On certain kernels or FUSE configurations, the FUSE kernel driver translates the
ESTALE(Stale File Handle) error returned by gcsfuse intoEIO(Input/Output Error) for some filesystem operations. To ensure these tests are robust and pass reliably across different kernel environments, this change accepts both EIO as well as ESTALE as valid errors.Link to the issue in case of a bug fix.
b/518338525
Testing details
Any backward incompatible change? If so, please explain.
None