Skip to content

fix(test): update fuseMaxNameLen on Linux to match newer kernel limits#4810

Merged
geertj merged 1 commit into
GoogleCloudPlatform:masterfrom
geertj:bug/fix-illegal-names
Jun 29, 2026
Merged

fix(test): update fuseMaxNameLen on Linux to match newer kernel limits#4810
geertj merged 1 commit into
GoogleCloudPlatform:masterfrom
geertj:bug/fix-illegal-names

Conversation

@geertj

@geertj geertj commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

The Linux kernel (since commit 27992ef8077) increased FUSE_NAME_MAX to PATH_MAX (4096). Updating the test constant to match this behavior allows the kernel to catch the illegal name length and return the expected ENAMETOOLONG error instead of passing it to GCSFuse.

@geertj geertj requested a review from a team as a code owner June 27, 2026 13:48
@geertj geertj requested a review from charith87 June 27, 2026 13:48
@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 updates a test constant to reflect changes in recent Linux kernel versions regarding FUSE name length limits. By increasing the limit to 4096, the test suite can correctly validate that the kernel handles illegal name lengths by returning an ENAMETOOLONG error, ensuring consistent behavior between the kernel and GCSFuse.

Highlights

  • Test Constant Update: Updated the fuseMaxNameLen constant for Linux environments from 1024 to 4096.
  • Kernel Compatibility: Aligned the test configuration with recent Linux kernel changes that increased FUSE_NAME_MAX to PATH_MAX.
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 fuseMaxNameLen constant for Linux from 1024 to 4096 to match newer Linux kernel FUSE limits. However, this change will cause the LegalNames test to fail because Google Cloud Storage (GCS) has a strict maximum object name limit of 1024 bytes. It is recommended to decouple the FUSE kernel limit from the GCS maximum legal name limit in the tests, for example by using min(fuseMaxNameLen, 1024).

Comment thread internal/fs/local_modifications_test.go Outdated
@geertj geertj force-pushed the bug/fix-illegal-names branch 2 times, most recently from c5afcb8 to f94a337 Compare June 27, 2026 14:32
On newer Linux kernels, FUSE_NAME_MAX is set to PATH_MAX - 1 (4095). Setting
fuseMaxNameLen to 4095 allows us to test illegal filename lengths with a value
that consistently triggers a kernel-level ENAMETOOLONG error across different
kernel versions.

Use a separate gcsMaxNameLen (1024) for the longest legal name test, matching
the GCS limit.

TAG=agy
CONV=cb2ad2c9-cd41-4085-af5c-0f82aa999dca
@geertj geertj force-pushed the bug/fix-illegal-names branch from f94a337 to 6798a73 Compare June 27, 2026 20:12
@geertj geertj merged commit 37fe2eb into GoogleCloudPlatform:master Jun 29, 2026
12 checks passed
raj-prince pushed a commit that referenced this pull request Jul 1, 2026
On newer Linux kernels, FUSE_NAME_MAX is set to PATH_MAX - 1 (4095). Setting
fuseMaxNameLen to 4095 allows us to test illegal filename lengths with a value
that consistently triggers a kernel-level ENAMETOOLONG error across different
kernel versions.

Use a separate gcsMaxNameLen (1024) for the longest legal name test, matching
the GCS limit.

TAG=agy
CONV=cb2ad2c9-cd41-4085-af5c-0f82aa999dca
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.

2 participants