Skip to content
Merged
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
17 changes: 17 additions & 0 deletions test/wasi/c/link.c
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
#include <assert.h>
#include <unistd.h>
#include <sys/stat.h>

#define OLD "/sandbox/input.txt"
#define NEW "/tmp/output.txt"

int main() {
struct stat st_old;
struct stat st_new;

assert(0 == stat(OLD, &st_old));
assert(0 == link(OLD, NEW));
assert(0 == stat(NEW, &st_new));
assert(st_old.st_ino == st_new.st_ino);
return 0;
}
1 change: 1 addition & 0 deletions test/wasi/test-wasi.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,6 +64,7 @@ if (process.argv[2] === 'wasi-child') {
runWASI({ test: 'getentropy' });
runWASI({ test: 'getrusage' });
runWASI({ test: 'gettimeofday' });
runWASI({ test: 'link' });
runWASI({ test: 'main_args' });
runWASI({ test: 'notdir' });
// runWASI({ test: 'poll' });
Expand Down
Binary file addedtest/wasi/wasm/link.wasm
Binary file not shown.