[njs] Test262: fixed unstable fs test.

noreply at nginx.com noreply at nginx.com
Thu May 30 16:26:05 UTC 2024


details:   https://hg.nginx.org/njs/rev/7c671d50f646
branches:  
changeset: 2348:7c671d50f646
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed May 29 22:26:09 2024 -0700
description:
Test262: fixed unstable fs test.

Ensuring that symlink file is removed even if regular file does not
exist.

diffstat:

 test/fs/methods.t.js |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 7d73d18e19f8 -r 7c671d50f646 test/fs/methods.t.js
--- a/test/fs/methods.t.js	Wed May 29 22:23:55 2024 -0700
+++ b/test/fs/methods.t.js	Wed May 29 22:26:09 2024 -0700
@@ -484,7 +484,8 @@ let stat_tests = () => [
 
         /* making symbolic link. */
 
-        try { fs.unlinkSync(fname); fs.unlinkSync(lname); } catch (e) {}
+        try { fs.unlinkSync(fname); } catch (e) {}
+        try { fs.unlinkSync(lname); } catch (e) {}
 
         fs.writeFileSync(fname, fname);
 


More information about the nginx-devel mailing list