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

test: add tests for pthread API #369

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 20, 2022

  1. test: add tests for pthread API

    This change runs the pthread tests available in `libc-test` when
    `THREAD_MODEL=posix`. This is currently a work-in-progress, since there
    are custom build steps necessary to get this all to (mostly) work.
    Currently this might look like:
    
    ```console
    $ cd test
    $ make run THREAD_MODEL=posix \
        ENGINE=~/Code/wasmtime/target/debug/wasmtime \
        CC=~/Code/llvm-project/build/bin/clang
    ```
    
    What are the current issues?
    - this requires a special build of Wasmtime that includes the
      `wasi-threads` implementation; this is shown above as built from
      source
    - under `THREAD_MODEL=posix`, this requires Clang to understand the
      `--export-memory` flag which, though merged in
      https://reviews.llvm.org/D135898, is not available for download yet
      (but can be built from latest source as shown above)
    - not all of the tests yet pass and some do not build: this is to be
      expected in several cases (PI? robust?) but there is perhaps more that
      can be done here to enable more of the pthread API. Only the working
      tests are included in this commit.
    abrown committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    2c12613 View commit details
    Browse the repository at this point in the history