Skip to content

move wasmtime-wasi's unit test for stdin to a separate integration test#7564

Merged
pchickey merged 3 commits intomainfrom
pch/separate_process_stdin
Nov 21, 2023
Merged

move wasmtime-wasi's unit test for stdin to a separate integration test#7564
pchickey merged 3 commits intomainfrom
pch/separate_process_stdin

Conversation

@pchickey
Copy link
Copy Markdown
Contributor

fork is always a terrible idea, but when we wrote this test, we couldn't think of an alternative method. alex showed us how /tests/host_segfault.rs works, which solves a similar problem for measuring process behavior without forking.

the forking version of this test would occasionally hang in the child's creation of a tokio runtime because std Once is not fork-safe (nor should it be. nothing should be fork-safe. forks are an abomination).

so instead, this is now a separate integration test with harness = false that will exec itself in order to run the child.

fork is always a terrible idea, but when we wrote this test, we couldn't
think of an alternative method. alex showed us how
`/tests/host_segfault.rs` works, which solves a similar problem for
measuring process behavior without forking.

the forking version of this test would occasionally hang in the child's
creation of a tokio runtime because std Once is not fork-safe (nor
should it be. nothing should be fork-safe. forks are an abomination).

so instead, this is now a separate integration test with `harness =
false` that will exec itself in order to run the child.
@pchickey pchickey requested a review from a team as a code owner November 21, 2023 01:54
@pchickey pchickey requested review from alexcrichton and removed request for a team November 21, 2023 01:54
@github-actions github-actions bot added the wasi Issues pertaining to WASI label Nov 21, 2023
@alexcrichton alexcrichton added this pull request to the merge queue Nov 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2023
@pchickey pchickey enabled auto-merge November 21, 2023 17:20
@pchickey pchickey added this pull request to the merge queue Nov 21, 2023
Merged via the queue into main with commit 2e8e09a Nov 21, 2023
@pchickey pchickey deleted the pch/separate_process_stdin branch November 21, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasi Issues pertaining to WASI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants