We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hard link creation successful print but the file do not exist. Related to #4870
(1)The test case is :
#include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> int get_fd(const char *filename, int flags) { int fd = open(filename, flags); if (fd == -1) { printf("Get file descriptor of file %s failed!\n", filename); return -1; } else { printf("Get file descriptor of file %s succeed!\n", filename); return fd; } } void closebyfd(int fd) { if (close(fd) == -1) { printf("Close the file %d by descriptor failed!\n", fd); } } void path_link_00002_Nan21() { printf("Enter function path_link_00002_Nan21\n"); int result = linkat(AT_FDCWD, "subdir_2/subdir_1/subfile_3", AT_FDCWD, "HARDLINKFILE", AT_SYMLINK_NOFOLLOW); if (result == -1) { printf("linkat failed"); } else { printf("Hard link creation successful\n"); } } int main() { printf("Enter function main\n"); path_link_00002_Nan21(); return 0; }
(2)compile to wasm:./wasi-sdk-21.0/bin/clang --target=wasm32-unkown-wasi --sysroot=./wasi-sdk-21.0/share/wasi-sysroot test.c -o test.wasm
./wasi-sdk-21.0/bin/clang --target=wasm32-unkown-wasi --sysroot=./wasi-sdk-21.0/share/wasi-sysroot test.c -o test.wasm
(3)Running wasm: (Before run the Wasm file, file subdir_2/subdir_1/subfile_3 exists.) wasmer run --dir=. test.wasm
wasmer run --dir=. test.wasm
Successfully create the link file and print:
Enter function main Enter function path_link_00002_Nan21 Hard link creation successful
And this is what WAMR, wasmtime and WasmEdge do.
wasmer print:
But the file HARDLINKFILE does not exist checking by command line, which is different from wasmtime, WAMR and WasmEdge.
Ubuntu 20.04 x86_64 wasmer-4.2.2
The text was updated successfully, but these errors were encountered:
maminrayej
No branches or pull requests
Describe the bug
Hard link creation successful print but the file do not exist.
Related to #4870
Steps to reproduce
(1)The test case is :
(2)compile to wasm:
./wasi-sdk-21.0/bin/clang --target=wasm32-unkown-wasi --sysroot=./wasi-sdk-21.0/share/wasi-sysroot test.c -o test.wasm
(3)Running wasm:
(Before run the Wasm file, file subdir_2/subdir_1/subfile_3 exists.)
wasmer run --dir=. test.wasm
Expected behavior
Successfully create the link file and print:
And this is what WAMR, wasmtime and WasmEdge do.
Actual behavior
wasmer print:
But the file HARDLINKFILE does not exist checking by command line, which is different from wasmtime, WAMR and WasmEdge.
Additional context
Ubuntu 20.04
x86_64
wasmer-4.2.2
The text was updated successfully, but these errors were encountered: