@@ -9255,16 +9255,43 @@ def test_noderawfs_disables_embedding(self):
92559255 self.assert_fail(base + ['--preload-file', 'somefile'], expected)
92569256 self.assert_fail(base + ['--embed-file', 'somefile'], expected)
92579257
9258+ @crossplatform
9259+ @also_with_wasmfs
92589260 def test_noderawfs_access_abspath(self):
92599261 create_file('foo', 'bar')
92609262 create_file('access.c', r'''
9263+ #include <stdio.h>
9264+ #include <assert.h>
92619265 #include <unistd.h>
92629266 int main(int argc, char** argv) {
9263- return access(argv[1], F_OK);
9267+ printf("testing access to %s\n", argv[1]);
9268+ int rtn = access(argv[1], F_OK);
9269+ assert(rtn == 0);
9270+ return 0;
92649271 }
92659272 ''')
92669273 self.do_runf('access.c', cflags=['-sNODERAWFS'], args=[os.path.abspath('foo')])
92679274
9275+ @crossplatform
9276+ @also_with_wasmfs
9277+ def test_noderawfs_open_abspath(self):
9278+ create_file('foo', 'bar')
9279+ create_file('open.c', r'''
9280+ #include <stdio.h>
9281+ #include <fcntl.h>
9282+ #include <assert.h>
9283+ #include <unistd.h>
9284+ int main(int argc, char** argv) {
9285+ printf("testing open to %s\n", argv[1]);
9286+ int fd = open(argv[1], O_RDONLY, 0644);
9287+ assert(fd >= 0);
9288+ int rtn = close(fd);
9289+ assert(rtn == 0);
9290+ return 0;
9291+ }
9292+ ''')
9293+ self.do_runf('open.c', cflags=['-sNODERAWFS'], args=[os.path.abspath('foo')])
9294+
92689295 def test_noderawfs_readfile_prerun(self):
92699296 create_file('foo', 'bar')
92709297 self.add_pre_run("console.log(FS.readFile('foo', { encoding: 'utf8' }));")
@@ -13210,11 +13237,10 @@ def test_unistd_chown(self):
1321013237 self.set_setting('WASMFS')
1321113238 self.do_run_in_out_file_test('wasmfs/wasmfs_chown.c')
1321213239
13213- @wasmfs_all_backends
1321413240 def test_wasmfs_getdents(self):
1321513241 # Run only in WASMFS for now.
1321613242 self.set_setting('FORCE_FILESYSTEM')
13217- self.do_run_in_out_file_test('wasmfs/wasmfs_getdents.c')
13243+ self.do_run_in_out_file_test('wasmfs/wasmfs_getdents.c', cflags=['-sWASMFS'] )
1321813244
1321913245 def test_wasmfs_jsfile(self):
1322013246 self.set_setting('WASMFS')
@@ -13801,15 +13827,11 @@ def test_fs_icase(self):
1380113827 @crossplatform
1380213828 @with_all_fs
1380313829 def test_std_filesystem(self):
13804- if self.get_setting('NODERAWFS') and self.get_setting('WASMFS'):
13805- self.skipTest('https://github.com/emscripten-core/emscripten/issues/24830')
1380613830 self.do_other_test('test_std_filesystem.cpp')
1380713831
1380813832 @crossplatform
1380913833 @with_all_fs
1381013834 def test_std_filesystem_tempdir(self):
13811- if self.get_setting('NODERAWFS') and self.get_setting('WASMFS'):
13812- self.skipTest('https://github.com/emscripten-core/emscripten/issues/24830')
1381313835 self.do_other_test('test_std_filesystem_tempdir.cpp', cflags=['-g'])
1381413836
1381513837 def test_strict_js_closure(self):
0 commit comments