fix(test): update fuseMaxNameLen on Linux to match newer kernel limits#4810
Conversation
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 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
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 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).
c5afcb8 to
f94a337
Compare
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
f94a337 to
6798a73
Compare
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
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.