| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,17 @@ | |||
| 1 | + #include <assert.h> | ||
| 2 | + #include <unistd.h> | ||
| 3 | + #include <sys/stat.h> | ||
| 4 | + | ||
| 5 | + #define OLD "/sandbox/input.txt" | ||
| 6 | + #define NEW "/tmp/output.txt" | ||
| 7 | + | ||
| 8 | + int main() { | ||
| 9 | + struct stat st_old; | ||
| 10 | + struct stat st_new; | ||
| 11 | + | ||
| 12 | + assert(0 == stat(OLD, &st_old)); | ||
| 13 | + assert(0 == link(OLD, NEW)); | ||
| 14 | + assert(0 == stat(NEW, &st_new)); | ||
| 15 | + assert(st_old.st_ino == st_new.st_ino); | ||
| 16 | + return 0; | ||
| 17 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,6 +64,7 @@ if (process.argv[2] === 'wasi-child') { | |||
| 64 | 64 | runWASI({ test: 'getentropy' }); | |
| 65 | 65 | runWASI({ test: 'getrusage' }); | |
| 66 | 66 | runWASI({ test: 'gettimeofday' }); | |
| 67 | + runWASI({ test: 'link' }); | ||
| 67 | 68 | runWASI({ test: 'main_args' }); | |
| 68 | 69 | runWASI({ test: 'notdir' }); | |
| 69 | 70 | // runWASI({ test: 'poll' }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments