Skip to content
Closed
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
4 changes: 4 additions & 0 deletions test/stat/test_chmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void test() {
stat("file", &s);
assert(s.st_mode == (S_IWUSR | S_IFREG));
assert(s.st_ctime != lastctime);
printf("(1) s.st_mtime=%lld, lastmtime=%lld\n", (long long)s.st_mtime, (long long)lastmtime);
assert(s.st_mtime == lastmtime);

//
Expand All @@ -82,6 +83,7 @@ void test() {
stat("file", &s);
assert(s.st_mode == (S_IXUSR | S_IFREG));
assert(s.st_ctime != lastctime);
printf("(2) s.st_mtime=%lld, lastmtime=%lld\n", (long long)s.st_mtime, (long long)lastmtime);
assert(s.st_mtime == lastmtime);

//
Expand All @@ -106,6 +108,7 @@ void test() {
stat("otherfile", &s);
assert(s.st_mode == (S_IXUSR | S_IFREG));
assert(s.st_ctime != lastctime);
printf("(3) s.st_mtime=%lld, lastmtime=%lld\n", (long long)s.st_mtime, (long long)lastmtime);
assert(s.st_mtime == lastmtime);

//
Expand All @@ -125,6 +128,7 @@ void test() {
stat("folder", &s);
assert(s.st_mode == (S_IWUSR | S_IXUSR | S_IFDIR));
assert(s.st_ctime != lastctime);
printf("(4) s.st_mtime=%lld, lastmtime=%lld\n", (long long)s.st_mtime, (long long)lastmtime);
assert(s.st_mtime == lastmtime);

#ifndef WASMFS // TODO https://github.com/emscripten-core/emscripten/issues/15948
Expand Down
3 changes: 2 additions & 1 deletion test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5694,7 +5694,8 @@ def test_stat_chmod(self):
self.skipTest('mode bits work differently on windows')
if nodefs and self.get_setting('WASMFS'):
self.skipTest('test requires symlink creation which currently missing from wasmfs+noderawfs')
self.do_runf('stat/test_chmod.c', 'success', cflags=['-Werror=conversion'])
output = self.do_runf('stat/test_chmod.c', 'success', cflags=['-Werror=conversion'])
print(str(output))

@also_with_wasmfs
def test_stat_mknod(self):
Expand Down