Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when the file name being statted is just "\n" #2933

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

kislaykishore
Copy link
Collaborator

@kislaykishore kislaykishore commented Jan 24, 2025

Description

GCSFuse crashes when a stat call is made for a path where the file name is just "\n". Instead, return an ENOENT error.

Link to the issue in case of a bug fix.

b/391795883
GH Issue: #2939

Testing details

  1. Manual - NA
  2. Unit tests - NA
  3. Integration tests - Added.

@kislaykishore kislaykishore added the execute-integration-tests Run only integration tests label Jan 24, 2025
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 30.76923% with 9 lines in your changes missing coverage. Please review.

Project coverage is 75.63%. Comparing base (d45540f) to head (d60dd26).
Report is 28 commits behind head on master.

Files with missing lines Patch % Lines
internal/fs/fs.go 30.76% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2933   +/-   ##
=======================================
  Coverage   75.62%   75.63%           
=======================================
  Files         125      125           
  Lines       17641    17656   +15     
=======================================
+ Hits        13341    13354   +13     
  Misses       3738     3738           
- Partials      562      564    +2     
Flag Coverage Δ
unittests 75.63% <30.76%> (+<0.01%) ⬆️

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

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

@kislaykishore kislaykishore changed the title Fix crash Fix crash when the file name being statted is just "\n" Jan 24, 2025
@kislaykishore kislaykishore marked this pull request as ready for review January 24, 2025 10:50
@kislaykishore kislaykishore requested review from Tulsishah and a team as code owners January 24, 2025 10:50
internal/fs/fs.go Show resolved Hide resolved
internal/fs/fs.go Show resolved Hide resolved
internal/fs/fs.go Show resolved Hide resolved
@kislaykishore kislaykishore enabled auto-merge (squash) January 27, 2025 05:01
@kislaykishore kislaykishore merged commit 842b15b into master Jan 27, 2025
13 checks passed
@kislaykishore kislaykishore deleted the fix-crash branch January 27, 2025 05:36
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants