Skip to content
Open
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
2 changes: 1 addition & 1 deletion system/lib/wasmfs/backends/noderawfs_root.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace wasmfs {

backend_t wasmfs_create_root_dir(void) {
return wasmfs_create_node_backend(".");
return wasmfs_create_node_backend("/");
}

} // namespace wasmfs
12 changes: 9 additions & 3 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -10447,16 +10447,22 @@ def test_noderawfs_disables_embedding(self):
err = self.expect_fail(base + ['--embed-file', 'somefile'])
self.assertContained(expected, err)

@also_with_wasmfs
def test_noderawfs_access_abspath(self):
create_file('foo', 'bar')
create_file('access.c', r'''
#include <stdio.h>
#include <assert.h>
#include <unistd.h>

int main(int argc, char** argv) {
return access(argv[1], F_OK);
printf("testing access to %s\n", argv[1]);
int rtn = access(argv[1], F_OK);
assert(rtn == 0);
return 0;
}
''')
self.run_process([EMCC, 'access.c', '-sNODERAWFS'])
self.run_js('a.out.js', args=[os.path.abspath('foo')])
self.do_runf('access.c', cflags=['-sNODERAWFS'], args=[os.path.abspath('foo')])

def test_noderawfs_readfile_prerun(self):
create_file('foo', 'bar')
Expand Down
Loading