-
Notifications
You must be signed in to change notification settings - Fork 8
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
test: unable to use build.sh
#36
Comments
Thanks Andrew for the report. I think the default compiler configuration in build.sh is far from being perfect; this is what we have in the wasi-testsuite repo to build it: https://github.com/WebAssembly/wasi-testsuite/blob/main/scripts/update-proposal-tests.sh#L26 |
Interesting; with On a slightly different note, I want to propose a perhaps controversial opinion: why don't we just build this specific test, either with a script or a Dockerfile, and check in the compiled WebAssembly? My reasoning is that this checked-in artifact should only be necessary for this test or some small subset of future C tests and it is much more convenient on the "just run the tests" side to not have to worry about building any artifacts. E.g., in bytecodealliance/wasmtime#5907 I ended up just running the WAT files directly instead of converting them to binary form (and this Here's another dimension to this: in Wasmtime, e.g., most of the test infrastructure is Rust-based, so I built a simple test runner in Rust. This avoids a Python dependency when a user runs @loganek, let me know what you think! |
I know this wasn't a question for me :) but I like the idea of having a way to run things easier. |
Hi, sorry for late reply.
Most likely not, I'll try to upgrade it (update: WebAssembly/wasi-testsuite#69)
We already do that. Please see https://github.com/WebAssembly/wasi-testsuite/tree/prod/testsuite-base for tests for existing snapshot and https://github.com/WebAssembly/wasi-testsuite/tree/prod/testsuite-all for all tests (including proposals, that are updated daily). The reason we push it to separate branches is because we've got feedback from people living in locations where internet connection isn't great that it will affect their development process. I personally don't know if that's really a big problem, but at the same time pushing those test binaries to separate branch isn't a big deal from maintenance perspective, so we keep it like that for now.
Yes, python test runner is considered a reference test runner, but other runners can co-exist as well. I'll work on the documentation in the upcoming weeks. After that we can add more test runner implementations if needed. One note though - we'll have to figure out how to add tests to for the runner itself to make sure all implementations work fine. |
I checked this issue again with your suggestion but this is the error I see: $ CC="$WASI_SDK_DIR/bin/clang -pthread --sysroot=$WASI_SDK_DIR/share/wasi-sysroot -Wl,--import-memory --target=wasm32-wasi-threads" ./build.sh
Compiling testsuite/thread_spawn-simple.c
testsuite/thread_spawn-simple.c:1:10: fatal error: 'assert.h' file not found
#include <assert.h>
^~~~~~~~~~
1 error generated. |
I wasn't able to reproduce your issue using wasi-sdk-20. What's the SDK version you use? Also, could you check if |
Huh, this is weird: $ CC="/opt/wasi-sdk/wasi-sdk-20.0/bin/clang -pthread --sysroot=/opt/wasi-sdk/wasi-sdk-20.0/share/wasi-sysroot -Wl,--import-memory --target=wasm32-wasi-threads" ./build.sh
Compiling testsuite/thread_spawn-simple.c My mistake! Ok, so how do we resolve this issue? Do we set the default |
@abrown @loganek
To make it run on
|
@g0djan have you defined stack size in the command? Is it possible that the test goes beyond the stack? Also, what's the max memory defined? |
|
When I run
build.sh
, I see the following errors:It seems like there are some specific environment requirements for these scripts to work that we should document. I can figure these out separately (unless @loganek or @yamt you know them off hand?) but I just wanted to record the issue.
The text was updated successfully, but these errors were encountered: