Skip to content

Commit

Permalink
test: enable pthread-related libc-tests (#560)
Browse files Browse the repository at this point in the history
This change enables the pthread-related tests in the libc-test suite.
The tests are enabled only for the `wasm32-wasip1-threads` target, which
is the only target that supports threads at the moment.

The following pthread tests are still disabled:
- pthread_cancel-points.c
- pthread_cancel.c
- pthread_robust.c

This is a preparative change for
swiftwasm/swift#5598
  • Loading branch information
kateinoigakukun authored Jan 20, 2025
1 parent 2504bcd commit f1c557c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/src/libc-test/functional/pthread_cond.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! filter.py(TARGET_TRIPLE): wasm32-wasip1-threads
//! add-flags.py(CFLAGS): -I.
//! add-flags.py(LDFLAGS): -Wl,--import-memory,--export-memory,--shared-memory,--max-memory=1073741824
//! add-flags.py(RUN): --wasi threads
#include "build/download/libc-test/src/functional/pthread_cond.c"
5 changes: 5 additions & 0 deletions test/src/libc-test/functional/pthread_mutex.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! filter.py(TARGET_TRIPLE): wasm32-wasip1-threads
//! add-flags.py(CFLAGS): -I.
//! add-flags.py(LDFLAGS): -Wl,--import-memory,--export-memory,--shared-memory,--max-memory=1073741824
//! add-flags.py(RUN): --wasi threads
#include "build/download/libc-test/src/functional/pthread_mutex.c"
5 changes: 5 additions & 0 deletions test/src/libc-test/functional/pthread_tsd.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! filter.py(TARGET_TRIPLE): wasm32-wasip1-threads
//! add-flags.py(CFLAGS): -I.
//! add-flags.py(LDFLAGS): -Wl,--import-memory,--export-memory,--shared-memory,--max-memory=1073741824
//! add-flags.py(RUN): --wasi threads
#include "build/download/libc-test/src/functional/pthread_tsd.c"

0 comments on commit f1c557c

Please sign in to comment.