From e094bddcc97f48ad106d9821d5f779967a2f5178 Mon Sep 17 00:00:00 2001 From: Chris Dryden Date: Sat, 22 Nov 2025 13:41:39 -0500 Subject: [PATCH] Reducing sleep times and timeout times in test_timeout --- tests/by-util/test_timeout.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/by-util/test_timeout.rs b/tests/by-util/test_timeout.rs index b04b32203..27800f06d 100644 --- a/tests/by-util/test_timeout.rs +++ b/tests/by-util/test_timeout.rs @@ -55,11 +55,11 @@ fn test_command_with_args() { fn test_verbose() { for verbose_flag in ["-v", "--verbose"] { new_ucmd!() - .args(&[verbose_flag, ".1", "sleep", "10"]) + .args(&[verbose_flag, ".1", "sleep", "1"]) .fails() .stderr_only("timeout: sending signal TERM to command 'sleep'\n"); new_ucmd!() - .args(&[verbose_flag, "-s0", "-k.1", ".1", "sleep", "10"]) + .args(&[verbose_flag, "-s0", "-k.1", ".1", "sleep", "1"]) .fails() .stderr_only("timeout: sending signal EXIT to command 'sleep'\ntimeout: sending signal KILL to command 'sleep'\n"); } @@ -112,7 +112,7 @@ fn test_preserve_status_even_when_send_signal() { // So, expected result is success and code 0. for cont_spelling in ["CONT", "cOnT", "SIGcont"] { new_ucmd!() - .args(&["-s", cont_spelling, "--preserve-status", ".1", "sleep", "2"]) + .args(&["-s", cont_spelling, "--preserve-status", ".1", "sleep", "1"]) .succeeds() .no_output(); } @@ -186,10 +186,10 @@ fn test_kill_subprocess() { new_ucmd!() .args(&[ // Make sure the CI can spawn the subprocess. - "10", + "1", "sh", "-c", - "trap 'echo inside_trap' TERM; sleep 30", + "trap 'echo inside_trap' TERM; sleep 5", ]) .fails_with_code(124) .stdout_contains("inside_trap");