### Version master,v16.8.0 ### Platform Microsoft Windows NT 10.0.22000.0 x64 (latest Windows 11 beta) ### Subsystem fs ### What steps will reproduce the bug? Run `node test/parallel/test-fs-stat.js` ### How often does it reproduce? Is there a required condition? Always ### What is the expected behavior? Test should pass ### What do you see instead? node test/parallel/test-fs-stat.js node:assert:986 throw newErr; ^ ``` AssertionError [ERR_ASSERTION]: ifError got unwanted exception: EISDIR: illegal operation on a directory, fstat at D:\Git\nodejs\node\test\common\index.js:364:12 at D:\Git\nodejs\node\test\common\index.js:401:15 at FSReqCallback.oncomplete (node:fs:198:21) { generatedMessage: false, code: 'ERR_ASSERTION', actual: [Error: EISDIR: illegal operation on a directory, fstat] { errno: -4068, code: 'EISDIR', syscall: 'fstat' }, expected: null, operator: 'ifError' } ``` ### Additional information Fails here: https://github.com/nodejs/node/blob/80785f6ec965dbcfba5b8c263befc373bd08b525/test/parallel/test-fs-stat.js#L50
Activity
targos commentedon Sep 5, 2021
It can be easily reproduced with the following script:
[-]test-fs-stat fails on Windows[/-][+]fs.fstat(0) fails on Windows[/+]targos commentedon Nov 18, 2021
@nodejs/platform-windows This is still an issue on my machine.
win: fix fstat for stdio streams
win: fix fstat for stdio streams
win: fix fstat for pipes and character files (#3811)
StefanStojanovic commentedon Nov 30, 2022
The fix for this landed in libuv libuv/libuv#3811. The next time libuv is updated Node will be fixed as well.
StefanStojanovic commentedon Jun 7, 2023
After updating
libuvto 1.45.0 this is fixed. @targos can you please close the issue? Thanks.win: fix fstat for pipes and character files (#3811)
win: fix fstat for pipes and character files (#3811)