We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f710dbf commit 4913051Copy full SHA for 4913051
test/wasi/c/stat.c
@@ -11,6 +11,7 @@
11
#define SIZE 500
12
13
int main(void) {
14
+ struct timespec times[2];
15
struct stat st;
16
int fd;
17
int ret;
@@ -33,6 +34,15 @@ int main(void) {
33
34
assert(ret == 0);
35
assert(st.st_size == SIZE);
36
37
+ times[0].tv_sec = 4;
38
+ times[0].tv_nsec = 0;
39
+ times[1].tv_sec = 9;
40
+ times[1].tv_nsec = 0;
41
+ assert(0 == futimens(fd, times));
42
+ assert(0 == fstat(fd, &st));
43
+ assert(4 == st.st_atime);
44
+ assert(9 == st.st_mtime);
45
+
46
ret = close(fd);
47
48
test/wasi/wasm/stat.wasm
2.89 KB
0 commit comments