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

Flaky fork snapshot test #3847

Closed
Michael-F-Bryan opened this issue May 4, 2023 · 2 comments
Closed

Flaky fork snapshot test #3847

Michael-F-Bryan opened this issue May 4, 2023 · 2 comments
Assignees
Labels
bug Something isn't working 📦 lib-wasi About wasmer-wasi lib-wasix Issues related to the WASIX toolchain. priority-medium Medium priority issue 🏚 stale Inactive issues or PR

Comments

@Michael-F-Bryan
Copy link
Contributor

Describe the bug

The snapshot::test_snapshot_fork snapshot test depends on the ordering of print statements between a parent and child process, which can cause spurious failures, typically in CI.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/integration/cli/tests/snapshots/snapshot__snapshot_fork.snap
Snapshot: snapshot_fork
Source: tests/integration/cli/tests/snapshot.rs:714
────────────────────────────────────────────────────────────────────────────────
Expression: snapshot
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
   14    14 │     "enable_network": false
   15    15 │   },
   16    16 │   "result": {
   17    17 │     "Success": {
   18       │-      "stdout": "Parent has x = 0\nParent memory is good\nChild has x = 2\nChild memory is good\nChild(2) exited with 3\n",
         18 │+      "stdout": "Parent has x = 0\nChild has x = 2\nParent memory is good\nChild memory is good\nChild(2) exited with 3\n",
   19    19 │       "stderr": "",
   20    20 │       "exit_code": 0
   21    21 │     }
   22    22 │   }
────────────┴───────────────────────────────────────────────────────────────────

You should be able to reproduce this error by running the following:

$ cargo build --package=wasmer-cli --features=cranelift,singlepass --release
$ while true; do
clear
cargo test --package wasmer-integration-tests-cli --test snapshot -- --exact test_snapshot_fork || break
done

Additional Information

This is similar to #3845, except instead of relying on the ordering of thread execution, we're relying on how the executor decides to schedule WASI processes.

@Michael-F-Bryan Michael-F-Bryan added bug Something isn't working 📦 lib-wasi About wasmer-wasi lib-wasix Issues related to the WASIX toolchain. labels May 4, 2023
@Michael-F-Bryan Michael-F-Bryan added the priority-medium Medium priority issue label May 9, 2023
Copy link

stale bot commented May 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🏚 stale Inactive issues or PR label May 9, 2024
Copy link

stale bot commented Jun 9, 2024

Feel free to reopen the issue if it has been closed by mistake.

@stale stale bot closed this as completed Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📦 lib-wasi About wasmer-wasi lib-wasix Issues related to the WASIX toolchain. priority-medium Medium priority issue 🏚 stale Inactive issues or PR
Projects
None yet
Development

No branches or pull requests

2 participants