test: enable pthread-related libc-tests#560
Conversation
test/Makefile
Outdated
| # Always include the `libc-test` infrastructure headers. | ||
| CFLAGS += -I$(INFRA_HEADERS_DIR) | ||
| ifneq ($(findstring -threads,$(TARGET_TRIPLE)),) | ||
| LDFLAGS += -Wl,--import-memory,--export-memory,--shared-memory,--max-memory=1073741824 |
There was a problem hiding this comment.
Did you find that doing this same thing via the //! add-flags.py(LDFLAGS): ... annotation in the test files didn't work?
There was a problem hiding this comment.
Yes, it should work but I did it in this way as I think those flags are not a property of test cases but a property of the compiler target. Same with the engine flags.
There was a problem hiding this comment.
I see what you mean. Practically, though, it might be more convenient to move this to the test files since there may be discrepancies between targets; e.g., what if other threads tests don't require setting up 1G of max memory?
There was a problem hiding this comment.
And, honestly, the simpler we can make this Makefile, the better.
There was a problem hiding this comment.
Ok, it makes sense to me 👍
test/Makefile
Outdated
| ENGINE += --wasm component-model | ||
| OBJPAT := $(OBJDIR)/%.component.wasm | ||
| else | ||
| ENGINE += --wasi threads |
There was a problem hiding this comment.
Similarly, does the //! add-flags.py(RUN): ... annotation not work here?
890d59d to
0e11f56
Compare
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.
0e11f56 to
d80cfde
Compare
This change enables the pthread-related tests in the libc-test suite. The tests are enabled only for the
wasm32-wasip1-threadstarget, which is the only target that supports threads at the moment.The following pthread tests are still disabled:
This is a preparative change for swiftwasm/swift#5598