Skip to content

Conversation

@yamt
Copy link
Contributor

@yamt yamt commented Nov 22, 2022

(venv) spacetanuki% python3 test-runner/wasi_test_runner.py -t tests/assemblyscript/testsuite tests/c/testsuite -r adapters/wasm-micro-runtime.sh
Test environ_get-multiple-variables passed
Test fd_write-to-invalid-fd passed
Test environ_sizes_get-multiple-variables passed
Test args_sizes_get-no-arguments passed
Test args_get-multiple-arguments passed
Test args_sizes_get-multiple-arguments passed
Test fd_write-to-stdout passed
Test random_get-non-zero-length passed
Test environ_sizes_get-no-variables passed
Test random_get-zero-length passed
Test clock_getres-realtime passed
Test clock_gettime-monotonic passed
Test clock_getres-monotonic passed
Test clock_gettime-realtime passed

===== Test results =====
Runtime: iwasm v1.0.0
Suite: WASI Assemblyscript tests
  Total: 10
  Passed:  10
  Failed:  0

Suite: WASI C tests
  Total: 4
  Passed:  4
  Failed:  0

Test suites: 2 passed, 0 total
Tests:       14 passed, 0 total
(venv) spacetanuki%

@yamt yamt mentioned this pull request Nov 22, 2022
@loganek
Copy link
Collaborator

loganek commented Nov 22, 2022

Hi @yamt, could you make a change in test so it's expected to fail? Tests are based on exit codes, IIRC WAMR didn't by default pass exit code from module to user through iwasm. Is there any build flag to enable this behavior? If so, probably worth adding a comment in the adapter.

@yamt
Copy link
Contributor Author

yamt commented Nov 22, 2022

Hi @yamt, could you make a change in test so it's expected to fail? Tests are based on exit codes, IIRC WAMR didn't by default pass exit code from module to user through iwasm. Is there any build flag to enable this behavior? If so, probably worth adding a comment in the adapter.

iirc, wamr doesn't have a way to preserve wasi exit code.
probaby i will add it in upstream.

@yamt
Copy link
Contributor Author

yamt commented Nov 22, 2022

in the meantime i added a comment.

@yamt
Copy link
Contributor Author

yamt commented Nov 24, 2022

updated after bytecodealliance/wasm-micro-runtime#1748

```
spacetanuki% python3 test-runner/wasi_test_runner.py -t tests/assemblyscript/testsuite tests/c/testsuite -r adapters/wasm-micro-runtime.sh
Test environ_get-multiple-variables passed
Test fd_write-to-invalid-fd passed
Test environ_sizes_get-multiple-variables passed
Test args_sizes_get-no-arguments passed
Test proc_exit-success passed
Test proc_exit-failure passed
Test args_get-multiple-arguments passed
Test args_sizes_get-multiple-arguments passed
Test fd_write-to-stdout passed
Test random_get-non-zero-length passed
Test environ_sizes_get-no-variables passed
Test random_get-zero-length passed
Test clock_getres-realtime passed
Test clock_gettime-monotonic passed
Test clock_getres-monotonic passed
Test fopen-with-access passed
Test clock_gettime-realtime passed
Test fopen-with-no-access passed

===== Test results =====
Runtime: iwasm v1.1.1
Suite: WASI Assemblyscript tests
  Total: 12
  Passed:  12
  Failed:  0

Suite: WASI C tests
  Total: 6
  Passed:  6
  Failed:  0

Test suites: 2 passed, 0 total
Tests:       18 passed, 0 total
spacetanuki%
```
@yamt
Copy link
Contributor Author

yamt commented Nov 24, 2022

updated after fopen test

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.

2 participants