Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/fs/test_nodefs_readdir.wasmfs_win.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
listing contents of dir=/
.
..
dev
tmp
listing contents of dir=/working
.
..
existing
stdout
test_nodefs_readdir.js
test_nodefs_readdir.wasm
success
3 changes: 2 additions & 1 deletion test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5867,8 +5867,9 @@ def test_fs_nodefs_readdir(self):
os.makedirs('existing/a')
self.cflags += ['-lnodefs.js']
suffix = ''
# Windows does not add a name_pipe to test expectations.
if self.get_setting('WASMFS'):
suffix = '.wasmfs'
suffix = '.wasmfs_win' if WINDOWS else '.wasmfs'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC the issue here is the order in which directories are listed?

I wonder if we can instead have either:

  1. Have wasmfs list directories in a deterministic / alphabetical order
  2. Update the test to avoid depending on specific ordering.

Adding another separate copy of the expectations seems less desirable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an ordering problem, but a problem that Windows does not support FIFO objects on the filesystem, so the test is unable to add one. And hence fails to readdir() it in the filesystem on Windows.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a comment as to why these three different output are needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

elif self.is_wasm2js():
suffix = ".wasm2js"
self.do_run_in_out_file_test('fs/test_nodefs_readdir.c', out_suffix=suffix)
Expand Down