Skip to content

vfs: reject statfs for missing paths - #65693

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-statfs-non-existent-paths
Open

vfs: reject statfs for missing paths#65693
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-statfs-non-existent-paths

Conversation

@trivikr

@trivikr trivikr commented Sep 1, 2026

Copy link
Copy Markdown
Member

Fixes: #65692

Validate mounted VFS paths before returning synthetic statfs data so fs.statfsSync() and fs.promises.statfs() report ENOENT for missing paths. Forward validation errors asynchronously to fs.statfs() callbacks.


Assisted-by: codex:gpt-5.6-sol

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Sep 1, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2026
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (f9ab994) to head (40bd7ae).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65693      +/-   ##
==========================================
- Coverage   90.07%   90.05%   -0.03%     
==========================================
  Files         754      754              
  Lines      256395   256402       +7     
  Branches    48494    48506      +12     
==========================================
- Hits       230947   230893      -54     
- Misses      16563    16622      +59     
- Partials     8885     8887       +2     
Files with missing lines Coverage Δ
lib/fs.js 98.43% <100.00%> (+<0.01%) ⬆️
lib/internal/vfs/setup.js 87.35% <100.00%> (+0.01%) ⬆️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Validate mounted VFS paths before returning synthetic statfs data
so fs.statfsSync() and fs.promises.statfs() report ENOENT for missing
paths. Forward validation errors asynchronously to fs.statfs()
callbacks.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
@trivikr
trivikr force-pushed the vfs-statfs-non-existent-paths branch from 859f592 to 40bd7ae Compare September 2, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vfs: statfs succeeds for nonexistent paths

2 participants