From f061c0285a2dad01c61a8766131002e1831566cc Mon Sep 17 00:00:00 2001 From: Mahmoud-Emad Date: Sun, 14 Sep 2025 15:06:09 +0300 Subject: [PATCH] fix: Fix test execution hanging issue - Replace `os.execute()` with `os.system()` - Avoid hanging due to unclosed file descriptors - Update error message to include command exit code --- test_basic.vsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_basic.vsh b/test_basic.vsh index ece1fbec..8811c5f0 100755 --- a/test_basic.vsh +++ b/test_basic.vsh @@ -121,11 +121,11 @@ fn dotest(path string, base_dir string, mut cache TestCache) ! { cmd := 'v -stats -enable-globals -n -w -gc none test ${norm_path}' println(cmd) - result := os.execute(cmd) - eprintln(result) - if result.exit_code != 0 { - eprintln('Test failed: ${path}') - eprintln(result.output) + + // Use system() instead of execute() to avoid hanging on unclosed file descriptors + exit_code := os.system(cmd) + if exit_code != 0 { + eprintln('Test failed: ${path} (exit code: ${exit_code})') exit(1) }