Skip to content

test(dentry_cache): accept both ESTALE and EIO errors in notifier tests#4789

Merged
kislaykishore merged 1 commit into
masterfrom
eio-test
Jun 18, 2026
Merged

test(dentry_cache): accept both ESTALE and EIO errors in notifier tests#4789
kislaykishore merged 1 commit into
masterfrom
eio-test

Conversation

@kislaykishore

@kislaykishore kislaykishore commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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 into EIO (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

  1. Manual - N/A
  2. Unit tests - N/A
  3. Integration tests - Ran the test on Ubuntu 2604 where the test fails without this fix.

Any backward incompatible change? If so, please explain.

None

@kislaykishore kislaykishore added the execute-integration-tests Run only integration tests label Jun 18, 2026
@kislaykishore kislaykishore marked this pull request as ready for review June 18, 2026 08:59
@kislaykishore kislaykishore requested review from a team and meet2mky as code owners June 18, 2026 08:59
@kislaykishore kislaykishore requested a review from raj-prince June 18, 2026 08:59
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (21838b2) to head (9214b52).

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     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Jun 18, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Error Handling Update: Introduced a new validation helper function, ValidateESTALEOrEIOError, to accommodate kernel-specific variations where ESTALE errors are translated to EIO.
  • Test Robustness: Updated integration tests in dentry_cache to utilize the new error validation logic, ensuring tests pass reliably across different kernel environments.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@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 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.

Comment thread tools/integration_tests/util/operations/validation_helper.go Outdated
Comment thread tools/integration_tests/util/operations/validation_helper.go Outdated
Comment thread tools/integration_tests/util/operations/validation_helper.go Outdated
meet2mky
meet2mky previously approved these changes Jun 18, 2026

@meet2mky meet2mky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@kislaykishore

Copy link
Copy Markdown
Collaborator Author

/gemini review

@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 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.

@kislaykishore kislaykishore enabled auto-merge (squash) June 18, 2026 09:48
@kislaykishore kislaykishore merged commit 7faac8e into master Jun 18, 2026
17 checks passed
@meet2mky meet2mky deleted the eio-test branch June 18, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

execute-integration-tests Run only integration tests remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants