diff --git a/test/wasi/c/stat.c b/test/wasi/c/stat.c index e4fcafd713d855..877e5b68a130a2 100644 --- a/test/wasi/c/stat.c +++ b/test/wasi/c/stat.c @@ -11,6 +11,7 @@ #define SIZE 500 int main(void) { + struct timespec times[2]; struct stat st; int fd; int ret; @@ -33,6 +34,15 @@ int main(void) { assert(ret == 0); assert(st.st_size == SIZE); + times[0].tv_sec = 4; + times[0].tv_nsec = 0; + times[1].tv_sec = 9; + times[1].tv_nsec = 0; + assert(0 == futimens(fd, times)); + assert(0 == fstat(fd, &st)); + assert(4 == st.st_atime); + assert(9 == st.st_mtime); + ret = close(fd); assert(ret == 0); diff --git a/test/wasi/wasm/stat.wasm b/test/wasi/wasm/stat.wasm index 62093147938347..4a50c0282bb60a 100755 Binary files a/test/wasi/wasm/stat.wasm and b/test/wasi/wasm/stat.wasm differ