Skip to content
New issue

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

feat: added tests for socket apis #1900

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

hritikgupta
Copy link
Contributor

No description provided.

core/iwasm/libraries/lib-socket/test/tcp.c Outdated Show resolved Hide resolved
core/iwasm/libraries/lib-socket/test/tcp.c Outdated Show resolved Hide resolved
core/iwasm/libraries/lib-socket/test/tcp.c Outdated Show resolved Hide resolved
core/iwasm/libraries/lib-socket/test/tcp.c Outdated Show resolved Hide resolved
@lum1n0us
Copy link
Collaborator

We'd better not check in a binary file (core/iwasm/libraries/lib-socket/test/tcp)

@lum1n0us
Copy link
Collaborator

@loganek @wenyongh we usually keep similar code in samples/socket-api, is it better if we also store above code there?

@wenyongh
Copy link
Contributor

We'd better not check in a binary file (core/iwasm/libraries/lib-socket/test/tcp)

Yes, don't check in wasm binary file here.

@wenyongh
Copy link
Contributor

@loganek @wenyongh we usually keep similar code in samples/socket-api, is it better if we also store above code there?

No, had better move the source files into samples/socket-api/src, rename the sample files with suitable names, and update document about how to run the samples and what the output should be.

@hritikgupta Could you add the files as samples in samples/socket-api/src and update the document and build scripts? Thanks.

@loganek
Copy link
Collaborator

loganek commented Jan 27, 2023

@wenyongh , @lum1n0us so the intention of this is to run those tests as part of WASI test suite. I don't have strong opinion about where to put those tests, but my preference would be to keep examples and tests separate (even though there's some overlap).

@loganek
Copy link
Collaborator

loganek commented Jan 27, 2023

@hritikgupta could you also add integration with wasi testsuite to this PR? I think the change might be a bit confusing without that.

@wenyongh
Copy link
Contributor

@wenyongh , @lum1n0us so the intention of this is to run those tests as part of WASI test suite. I don't have strong opinion about where to put those tests, but my preference would be to keep examples and tests separate (even though there's some overlap).

Got it, if they are only tests, it should be good to put them here, and yes, had better add them to CI test.

@hritikgupta
Copy link
Contributor Author

We'd better not check in a binary file (core/iwasm/libraries/lib-socket/test/tcp)

Yes, don't check in wasm binary file here.

Right right, this got committed accidentally while I was testing the script, will remove this as a part of the commit addressing the remaining review comments.

@hritikgupta hritikgupta force-pushed the sockettest branch 4 times, most recently from 0e65441 to c34cabc Compare March 8, 2023 20:03
@hritikgupta
Copy link
Contributor Author

@wenyongh / @loganek — addressed the changes, does this look good to merge?

@@ -457,6 +457,10 @@ jobs:
$THREADS_TEST_OPTIONS,
$WASI_TEST_OPTIONS,
]
wasi_sdk_release:
[
"https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same change was already added in #1963 so now no need to add this line here after it was merged.
https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/.github/workflows/compilation_on_android_ubuntu.yml#L462

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

cd /opt
sudo wget ${{ matrix.wasi_sdk_release }}
sudo tar -xzf wasi-sdk-19.0-*.tar.gz
sudo mv wasi-sdk-19.0 wasi-sdk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NM=/opt/wasi-sdk/bin/llvm-nm \
CC=/opt/wasi-sdk/bin/clang \
THREAD_MODEL=posix
working-directory: core/deps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@wenyongh
Copy link
Contributor

wenyongh commented Mar 9, 2023

@wenyongh / @loganek — addressed the changes, does this look good to merge?

It is good to me, but need to remove the duplicated changes with #1963.

Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit ff38877 into bytecodealliance:main Mar 9, 2023
wenyongh added a commit to wenyongh/wasm-micro-runtime that referenced this pull request Mar 9, 2023
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants