diff mbox series

[1/3] tests/tcg: Use SIGKILL for timeout

Message ID 20230117035701.168514-2-richard.henderson@linaro.org
State Superseded
Headers show
Series tests: Fix some deadlocks | expand

Commit Message

Richard Henderson Jan. 17, 2023, 3:56 a.m. UTC
There are some tests for which SIGTERM appears insufficient.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tests/tcg/Makefile.target | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Bennée Jan. 17, 2023, 9:36 a.m. UTC | #1
Richard Henderson <richard.henderson@linaro.org> writes:

> There are some tests for which SIGTERM appears insufficient.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  tests/tcg/Makefile.target | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
> index 14bc013181..a3b0aaf8af 100644
> --- a/tests/tcg/Makefile.target
> +++ b/tests/tcg/Makefile.target
> @@ -54,10 +54,10 @@ cc-option = if $(call cc-test, $1); then \
>  
>  # $1 = test name, $2 = cmd, $3 = desc
>  ifeq ($(filter %-softmmu, $(TARGET)),)
> -run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1.out, \
> +run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2 > $1.out, \
>  	TEST,$(or $3, $*, $<) on $(TARGET_NAME))
>  else
> -run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2, \
> +run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2, \
>          TEST,$(or $3, $*, $<) on $(TARGET_NAME))
>  endif

I'll queue this directly into testing/next, thanks. Is this to deal with
the hanging tests on the s390x box?
Richard Henderson Jan. 17, 2023, 3:28 p.m. UTC | #2
On 1/16/23 23:36, Alex Bennée wrote:
> 
> Richard Henderson <richard.henderson@linaro.org> writes:
> 
>> There are some tests for which SIGTERM appears insufficient.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   tests/tcg/Makefile.target | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
>> index 14bc013181..a3b0aaf8af 100644
>> --- a/tests/tcg/Makefile.target
>> +++ b/tests/tcg/Makefile.target
>> @@ -54,10 +54,10 @@ cc-option = if $(call cc-test, $1); then \
>>   
>>   # $1 = test name, $2 = cmd, $3 = desc
>>   ifeq ($(filter %-softmmu, $(TARGET)),)
>> -run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1.out, \
>> +run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2 > $1.out, \
>>   	TEST,$(or $3, $*, $<) on $(TARGET_NAME))
>>   else
>> -run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2, \
>> +run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2, \
>>           TEST,$(or $3, $*, $<) on $(TARGET_NAME))
>>   endif
> 
> I'll queue this directly into testing/next, thanks. Is this to deal with
> the hanging tests on the s390x box?

No, I saw this hang on x86_64 host, nios2 guest.

Perhaps copy the text from the cover letter, about process_pending_signals blocking all 
signals, and remaining blocked while dump_core_and_abort deadlocked.


r~
diff mbox series

Patch

diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
index 14bc013181..a3b0aaf8af 100644
--- a/tests/tcg/Makefile.target
+++ b/tests/tcg/Makefile.target
@@ -54,10 +54,10 @@  cc-option = if $(call cc-test, $1); then \
 
 # $1 = test name, $2 = cmd, $3 = desc
 ifeq ($(filter %-softmmu, $(TARGET)),)
-run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1.out, \
+run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2 > $1.out, \
 	TEST,$(or $3, $*, $<) on $(TARGET_NAME))
 else
-run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2, \
+run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2, \
         TEST,$(or $3, $*, $<) on $(TARGET_NAME))
 endif