Skip to content

Commit

Permalink
[WasmFS] Enable NODEFS tests on WasmFS (#23482)
Browse files Browse the repository at this point in the history
We had various tests disabled from before we had NODEFS support in
WasmFS.
  • Loading branch information
kripken authored Jan 24, 2025
1 parent ee32d3a commit 2bc4461
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5853,14 +5853,11 @@ def test_fs_stat_unnamed_file_descriptor(self):
@crossplatform
@with_all_fs
def test_fs_symlink_resolution(self):
nodefs = '-DNODEFS' in self.emcc_args or '-DNODERAWFS' in self.emcc_args
if self.get_setting('WASMFS'):
self.set_setting('FORCE_FILESYSTEM')
if nodefs:
if WINDOWS:
self.skipTest('No symlinks on Windows')
if self.get_setting('WASMFS'):
self.skipTest('NODEFS in WasmFS')
nodefs = '-DNODEFS' in self.emcc_args or '-DNODERAWFS' in self.emcc_args
if nodefs and WINDOWS:
self.skipTest('No symlinks on Windows')
self.do_runf('fs/test_fs_symlink_resolution.c', 'success')

@with_all_fs
Expand Down Expand Up @@ -5907,11 +5904,8 @@ def test_sigaction_default(self, signal, exit_code, assert_identical):
@crossplatform
@with_all_fs
def test_unistd_access(self):
nodefs = '-DNODEFS' in self.emcc_args or '-DNODERAWFS' in self.emcc_args
if self.get_setting('WASMFS'):
self.set_setting('FORCE_FILESYSTEM')
if nodefs:
self.skipTest('NODEFS in WasmFS')
# On windows we have slighly different output because we the same
# level of permissions are not available. For example, on windows
# its not possible have a file that is not readable, but writable.
Expand Down Expand Up @@ -5946,11 +5940,8 @@ def test_unistd_dup(self):

@with_all_fs
def test_unistd_truncate(self):
nodefs = '-DNODEFS' in self.emcc_args or '-DNODERAWFS' in self.emcc_args
if self.get_setting('WASMFS'):
self.set_setting('FORCE_FILESYSTEM')
if nodefs:
self.skipTest('TODO: NODEFS in WasmFS')
if WINDOWS or os.geteuid() == 0:
self.skipTest('Root access invalidates this test by being able to write on readonly files')
self.do_run_in_out_file_test('unistd/truncate.c')
Expand Down Expand Up @@ -5982,10 +5973,6 @@ def test_unistd_sysconf_phys_pages(self):
@no_windows('https://github.com/emscripten-core/emscripten/issues/8882')
@with_all_fs
def test_unistd_unlink(self):
nodefs = '-DNODEFS' in self.emcc_args or '-DNODERAWFS' in self.emcc_args
if self.get_setting('WASMFS') and nodefs:
self.skipTest('NODEFS in WasmFS')

# symlinks on node.js on non-linux behave differently (e.g. on Windows they require administrative privileges)
# so skip testing those bits on that combination.
if '-DNODEFS' in self.emcc_args:
Expand Down Expand Up @@ -6035,8 +6022,6 @@ def test_unistd_symlink_on_nodefs(self):
@also_with_nodefs
def test_unistd_io(self):
if self.get_setting('WASMFS'):
if '-DNODEFS' in self.emcc_args:
self.skipTest('NODEFS in WasmFS')
self.set_setting('FORCE_FILESYSTEM')
self.do_run_in_out_file_test('unistd/io.c')

Expand Down

0 comments on commit 2bc4461

Please sign in to comment.