-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
test: use unique file names in fs trace test #43504
Conversation
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: nodejs#43502
@bnoordhuis Great work! Thank you for the fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, can const tests = new Array();
be replaced with const tests = {};
(sic!)?
Make sense to me. It is wired use Array as a object/Map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use an incrementing variable in case we want to add/delete some test cases in the future?
Fast-track has been requested by @Trott. Please 👍 to approve. |
Landed in a7c9130 |
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: nodejs#43502 PR-URL: nodejs#43504 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: #43502 PR-URL: #43504 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: #43502 PR-URL: #43504 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: #43502 PR-URL: #43504 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: nodejs/node#43502 PR-URL: nodejs/node#43504 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Should fix test flakiness that is presumably caused by the asynchronous
nature of the unlink operation on Windows.
It's been observed that sub-tests randomly fail with "permission denied"
errors when trying to create a new file in a directory with appropriate
permissions.
The DeleteFile() NT API call makes a file inaccessible and marks it for
deletion but doesn't actually delete it until the last open handle has
been closed. Accessing such a file fails with ERROR_ACCESS_DENIED.
Processes can close handles manually or wait for the operating system to
close them asynchronously after process termination. I speculate it's
the latter that's causing the test to turn flaky.
Fixes: #43502