GeezerVison is showing github.com — fs: re-enable watch facility in AIX · nodejs/node@ae1f6fd
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/fs.md +7Lines changed: 7 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1752,6 +1752,13 @@ a new inode. The watch will emit an event for the delete but will continue |
1752 | 1752 | watching the *original* inode. Events for the new inode will not be emitted. |
1753 | 1753 | This is expected behavior. |
1754 | 1754 |
|
| 1755 | +In AIX, save and close of a file being watched causes two notifications - |
| 1756 | +one for adding new content, and one for truncation. Moreover, save and |
| 1757 | +close operations on some platforms cause inode changes that force watch |
| 1758 | +operations to become invalid and ineffective. AIX retains inode for the |
| 1759 | +lifetime of a file, that way though this is different from Linux / OS X, |
| 1760 | +this improves the usability of file watching. This is expected behavior. |
| 1761 | + |
1755 | 1762 | #### Filename Argument |
1756 | 1763 |
|
1757 | 1764 | <!--type=misc--> |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/parallel.status +1-8Lines changed: 1 addition & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,14 +19,7 @@ test-debug-signal-cluster : PASS,FLAKY |
19 | 19 |
|
20 | 20 | [$system==freebsd] |
21 | 21 |
|
22 | | -# fs-watch currently needs special configuration on AIX and we |
23 | | -# want to improve under https://github.com/nodejs/node/issues/5085. |
24 | | -# Tests are disabled so CI can be green and we can spot other |
25 | | -# regressions until this work is complete |
26 | 22 | [$system==aix] |
27 | | -test-fs-watch-enoent : FAIL, PASS |
28 | | -test-fs-watch-encoding : FAIL, PASS |
29 | | - |
30 | 23 | #covered by https://github.com/nodejs/node/issues/3796 |
31 | 24 | # but more frequent on AIX ? |
32 | | -test-debug-signal-cluster : PASS, FLAKY |
| 25 | +test-debug-signal-cluster : PASS, FLAKY |
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-fs-watch-encoding.js +9Lines changed: 9 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -14,6 +14,15 @@ const common = require('../common'); |
14 | 14 | const fs = require('fs'); |
15 | 15 | const path = require('path'); |
16 | 16 |
|
| 17 | +// fs-watch on folders have limited capability in AIX. |
| 18 | +// The testcase makes use of folder watching, and causes |
| 19 | +// hang. This behavior is documented. Skip this for AIX. |
| 20 | + |
| 21 | +if (common.isAix) { |
| 22 | + common.skip('folder watch capability is limited in AIX.'); |
| 23 | + return; |
| 24 | +} |
| 25 | + |
17 | 26 | common.refreshTmpDir(); |
18 | 27 |
|
19 | 28 | const fn = '新建文夹件.txt'; |
|