Skip to content

Add more cloexec tests#6193

Merged
marxin merged 7 commits intomainfrom
add-more-cloexec-tests
Feb 17, 2026
Merged

Add more cloexec tests#6193
marxin merged 7 commits intomainfrom
add-more-cloexec-tests

Conversation

@zebreus
Copy link
Contributor

@zebreus zebreus commented Feb 12, 2026

This PR adds wasix tests for CLOEXEC on pipes. It also adds tests around popen, because that was where I was encountering these issues.

The tests will pass after wasix-org/wasix-libc#99 is merged

Copilot AI review requested due to automatic review settings February 12, 2026 14:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new WASIX regression tests around FD_CLOEXEC behavior on pipes (notably pipe2(O_CLOEXEC)) and adds a popen-focused reproduction to catch stdin/EOF hangs caused by leaked pipe FDs across exec/spawn.

Changes:

  • Add a new tests/wasix/popen test case that exercises vfork vs popen behavior when writing to a child’s stdin.
  • Extend the existing tests/wasix/cloexec test to include a pipe2(O_CLOEXEC) flag verification.
  • Update cloexec/run.sh to add timeouts and run the new test entrypoint.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/wasix/popen/run.sh Builds and runs the new popen/vfork regression scenarios under timeouts.
tests/wasix/popen/main.c Implements combined echo/shell/vfork/popen test binary, including a popen-like implementation.
tests/wasix/popen/.no-build Switches popen test directory to self-build via run.sh.
tests/wasix/cloexec/run.sh Adds timeouts and runs the new pipe2_cloexec_test entrypoint (also recompiles).
tests/wasix/cloexec/main.c Adds a new pipe2_cloexec_test subcommand to assert FD_CLOEXEC is set.

@zebreus zebreus marked this pull request as draft February 13, 2026 09:23
@zebreus
Copy link
Contributor Author

zebreus commented Feb 13, 2026

Marked as draft until wasix-org/wasix-libc#99 is merged

@marxin
Copy link
Contributor

marxin commented Feb 16, 2026

Marked as draft until wasix-org/wasix-libc#99 is merged

The PR got merged, can we rebase the tests now?

@zebreus zebreus force-pushed the add-more-cloexec-tests branch 3 times, most recently from 038cf1a to aef451b Compare February 16, 2026 14:44
@zebreus zebreus force-pushed the add-more-cloexec-tests branch from aef451b to 36e84d8 Compare February 16, 2026 14:56
@zebreus zebreus marked this pull request as ready for review February 17, 2026 08:32
@marxin marxin merged commit 2e13102 into main Feb 17, 2026
95 checks passed
@marxin marxin deleted the add-more-cloexec-tests branch February 17, 2026 09:06
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.

3 participants