-
Notifications
You must be signed in to change notification settings - Fork 923
WASIX test revamp #6055
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
Draft
zebreus
wants to merge
14
commits into
main
Choose a base branch
from
wasix-test-revamp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,065
−66
Draft
WASIX test revamp #6055
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
55dc322
Clean up new wasix test infrastructure
zebreus 305cb76
Capture stdin and stdout of test wasm module
zebreus 4203d7a
Rework context_switching tests
zebreus e53752d
Start migrating tests from wasix-tests
zebreus 13c6ad0
Run cargo fmt
zebreus 3225724
Add test util for running wasm with output
zebreus ccab5a3
Add semaphore tests from wasix-tests
zebreus 48f9d3a
Add include for C++ headers in the sysroot
zebreus e14593a
Add lifecycle tests from wasix-tests
zebreus 220bc53
Add reflection tests
zebreus 61239aa
Move exception handling tests from wasix-tests
zebreus fd73c35
Add ffi tests
zebreus fd815f7
Add threadlocal tests from wasix-tests
zebreus ae37e3f
Add module caching to run_test_with_result
zebreus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,9 @@ | ||
| */*.test.wasm | ||
| */*.test.wasm | ||
| */*.out | ||
| wasix-tests | ||
| */*/* | ||
| !*/*/build.sh | ||
| !*/*/*.c | ||
| !*/*/*.cpp | ||
| !*/*/*.hpp | ||
| !*/*/*.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //! Basic tests from wasix-tests directory | ||
| //! | ||
| //! These tests verify fundamental functionality: | ||
| //! - helloworld: Basic printf and return 0 | ||
|
|
||
| mod wasixcc_test_utils; | ||
| use wasixcc_test_utils::{run_build_script, run_wasm}; | ||
|
|
||
| #[test] | ||
| fn test_helloworld() { | ||
| let wasm_path = run_build_script(file!(), "helloworld").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC main.c -o main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #include <stdio.h> | ||
|
|
||
| int main() { | ||
| printf("Hello, World!\n"); | ||
| return 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,162 +1,156 @@ | ||
| use std::path::PathBuf; | ||
| use std::process::Command; | ||
| use wasmer::Module; | ||
| use wasmer_types::ModuleHash; | ||
| use wasmer_wasix::runners::wasi::{RuntimeOrEngine, WasiRunner}; | ||
|
|
||
| fn test_with_wasixcc(name: &str) -> Result<(), anyhow::Error> { | ||
| eprintln!("Compiling test case: {}", name); | ||
| let test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")) | ||
| .join("tests") | ||
| .join(PathBuf::from( | ||
| file!() | ||
| .split('/') | ||
| .next_back() | ||
| .unwrap() | ||
| .trim_end_matches(".rs"), | ||
| )); | ||
| let main_c = test_dir.join(format!("{name}.c")); | ||
| let main_wasm = test_dir.join(format!("{name}.test.wasm")); | ||
|
|
||
| // Compile with wasixcc | ||
| let mut command = Command::new("wasixcc"); | ||
| command | ||
| .arg(&main_c) | ||
| .arg("-fwasm-exceptions") | ||
| .arg("-o") | ||
| .arg(&main_wasm) | ||
| .current_dir(&test_dir); | ||
| eprintln!("Running wasixcc: {:?}", command); | ||
| let compile_status = command.status().expect("Failed to run wasixcc"); | ||
| assert!(compile_status.success(), "wasixcc compilation failed"); | ||
|
|
||
| // Load the compiled WASM module | ||
| let wasm_bytes = std::fs::read(&main_wasm).expect("Failed to read compiled WASM file"); | ||
| let engine = wasmer::Engine::default(); | ||
| let module = Module::new(&engine, &wasm_bytes).expect("Failed to create module"); | ||
|
|
||
| // Run the WASM module using WasiRunner | ||
| let runner = WasiRunner::new(); | ||
| runner.run_wasm( | ||
| RuntimeOrEngine::Engine(engine), | ||
| "wasix-test", | ||
| module, | ||
| ModuleHash::random(), | ||
| ) | ||
| } | ||
| mod wasixcc_test_utils; | ||
| use wasixcc_test_utils::{run_build_script, run_wasm}; | ||
|
|
||
| // macOS is currently disabled, because cranelift does not | ||
| // support exception handling on that platform yet. | ||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_simple_switching() { | ||
| test_with_wasixcc("simple_switching").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "simple_switching").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_switching_with_main() { | ||
| test_with_wasixcc("switching_with_main").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "switching_with_main").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_switching_to_a_deleted_context() { | ||
| test_with_wasixcc("switching_to_a_deleted_context").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "switching_to_a_deleted_context").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_switching_threads() { | ||
| test_with_wasixcc("switching_in_threads").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "switching_in_threads").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_multiple_contexts() { | ||
| test_with_wasixcc("multiple_contexts").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "multiple_contexts").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_error_handling() { | ||
| test_with_wasixcc("error_handling").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "error_handling").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_nested_switches() { | ||
| test_with_wasixcc("nested_switches").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "nested_switches").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_contexts_with_mutexes() { | ||
| test_with_wasixcc("contexts_with_mutexes").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "contexts_with_mutexes").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_contexts_with_env_vars() { | ||
| test_with_wasixcc("contexts_with_env_vars").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "contexts_with_env_vars").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_contexts_with_signals() { | ||
| test_with_wasixcc("contexts_with_signals").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "contexts_with_signals").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_contexts_with_timers() { | ||
| test_with_wasixcc("contexts_with_timers").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "contexts_with_timers").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_contexts_with_pipes() { | ||
| test_with_wasixcc("contexts_with_pipes").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "contexts_with_pipes").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_pending_file_operations() { | ||
| test_with_wasixcc("pending_file_operations").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "pending_file_operations").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_recursive_host_calls() { | ||
| test_with_wasixcc("recursive_host_calls").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "recursive_host_calls").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_malloc_during_switch() { | ||
| test_with_wasixcc("malloc_during_switch").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "malloc_during_switch").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_nested_host_call_switch() { | ||
| test_with_wasixcc("nested_host_call_switch").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "nested_host_call_switch").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_switch_to_never_resumed() { | ||
| test_with_wasixcc("switch_to_never_resumed").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "switch_to_never_resumed").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_three_way_recursion() { | ||
| test_with_wasixcc("three_way_recursion").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "three_way_recursion").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
|
|
||
| #[cfg(all(unix, not(target_os = "macos")))] | ||
| #[test] | ||
| fn test_contexts_with_setjmp() { | ||
| test_with_wasixcc("contexts_with_setjmp").unwrap(); | ||
| let wasm_path = run_build_script(file!(), "contexts_with_setjmp").unwrap(); | ||
| let test_dir = wasm_path.parent().unwrap(); | ||
| run_wasm(&wasm_path, test_dir).unwrap(); | ||
| } | ||
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/contexts_with_env_vars/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC contexts_with_env_vars.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/contexts_with_mutexes/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC contexts_with_mutexes.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/contexts_with_pipes/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC contexts_with_pipes.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/contexts_with_setjmp/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC contexts_with_setjmp.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/contexts_with_signals/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC contexts_with_signals.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/contexts_with_timers/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC contexts_with_timers.c -o main |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC error_handling.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/malloc_during_switch/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC malloc_during_switch.c -o main |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC multiple_contexts.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/nested_host_call_switch/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC nested_host_call_switch.c -o main |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC nested_switches.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/pending_file_operations/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC pending_file_operations.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/recursive_host_calls/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC recursive_host_calls.c -o main |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC simple_switching.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/switch_to_never_resumed/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC switch_to_never_resumed.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/switching_in_threads/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC switching_in_threads.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/switching_to_a_deleted_context/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC switching_to_a_deleted_context.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/switching_with_main/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC switching_with_main.c -o main |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
lib/wasix/tests/context_switching/three_way_recursion/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
| $CC three_way_recursion.c -o main |
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repetitive code pattern across all test functions. Each test function follows the exact same three-line pattern. Consider creating a helper macro or function to reduce code duplication, which would improve maintainability and reduce the chance of copy-paste errors.