public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp
@ 2024-02-14  9:17 Guinevere Larsen
  2024-02-14  9:17 ` [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Guinevere Larsen
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Guinevere Larsen @ 2024-02-14  9:17 UTC (permalink / raw)
  To: gdb-patches; +Cc: Guinevere Larsen

The test was recently pushed to master but it had a couple of small
issues. This is a quick series to fix the 2 major issues that were
brought up to my attention.

Changes for v3:
* use get_valueof to get thread count, to stop a failure on Linaro's CI.

Changes for v2:
* changed xfail from patch 1 to a kfail

Guinevere Larsen (2):
  gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets
  gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc
    symbols

 gdb/testsuite/gdb.threads/threadcrash.exp | 46 +++++++----------------
 1 file changed, 14 insertions(+), 32 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets
  2024-02-14  9:17 [PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp Guinevere Larsen
@ 2024-02-14  9:17 ` Guinevere Larsen
  2024-02-15 14:37   ` Lancelot SIX
  2024-03-08 10:01   ` Tom de Vries
  2024-02-14  9:17 ` [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols Guinevere Larsen
  2024-03-06 13:02 ` [PING][PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp Guinevere Larsen
  2 siblings, 2 replies; 10+ messages in thread
From: Guinevere Larsen @ 2024-02-14  9:17 UTC (permalink / raw)
  To: gdb-patches; +Cc: Guinevere Larsen

There are 2 issues with the test gdb.threads/threadcrash.exp on arm
targets, both relating to issues in how the targets handles gcores. The
first is that the test fails to cout the number of threads in the
inferior and the second is that GDB can't properly backtrace from a
gcore.

The first error is fixed on this commit by getting the convenience
variable _inferior_thread_count as opposed to calculating it based on
the output of "info threads"

For the second, this test just emits a single xfail referring back to PR
corefiles/31294, which tracks the issues with gcores in 32-bit arm
targets.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31294
---
 gdb/testsuite/gdb.threads/threadcrash.exp | 29 ++++++-----------------
 1 file changed, 7 insertions(+), 22 deletions(-)

diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index 996e020d1e8..bf4534179e2 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -20,26 +20,6 @@
 # a gcore.
 
 
-# Check that the inferior has 7 threads, and return the number of threads (7).
-# We return the thread count so that, even if there is some error in the test,
-# the final log doesn't get flooded with failures.
-
-proc test_thread_count {} {
-    set thread_count 0
-
-    gdb_test_multiple "info threads" "getting thread count" -lbl {
-	-re "Thread" {
-	    incr thread_count
-	    exp_continue
-	}
-	-re "$::gdb_prompt " {
-	    gdb_assert {$thread_count == 7}
-	}
-    }
-
-    return $thread_count
-}
-
 # Use 'thread apply all backtrace' to check if all expected threads
 # are present, and stopped in the expected locations.  Set the global
 # TEST_LIST to be the a list of regexps expected to match all the
@@ -123,7 +103,8 @@ proc thread_apply_all {} {
 
 proc do_full_test {} {
     global test_list
-    set thread_count [test_thread_count]
+    set thread_count [get_valueof "" "\$_inferior_thread_count" 0]
+    gdb_assert {$thread_count == 7}
 
     thread_apply_all
 
@@ -230,4 +211,8 @@ test_live_inferior
 
 test_corefile
 
-test_gcore
+if { [is_aarch32_target] } {
+    kfail "gcore tests fail on 32-bit arm, see PR corefiles/31294"
+} else {
+    test_gcore
+}
-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols
  2024-02-14  9:17 [PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp Guinevere Larsen
  2024-02-14  9:17 ` [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Guinevere Larsen
@ 2024-02-14  9:17 ` Guinevere Larsen
  2024-03-06 17:16   ` Tom de Vries
  2024-03-06 13:02 ` [PING][PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp Guinevere Larsen
  2 siblings, 1 reply; 10+ messages in thread
From: Guinevere Larsen @ 2024-02-14  9:17 UTC (permalink / raw)
  To: gdb-patches; +Cc: Guinevere Larsen

The test gdb.threads/threadcrash.exp demanded GDB to fully unwind and
print the names of all functions. However, some of the functions are
from the libc library, and so the test implicitly demanded libc symbols
to be available, and would fail otherwise, as was raised in PR
gdb/31293.

This commit changes it so we only explicitly check for functions that
are provided by threadcrash.c to fix that

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31293
---
 gdb/testsuite/gdb.threads/threadcrash.exp | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index bf4534179e2..2bbedcce58e 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -40,26 +40,23 @@ proc thread_apply_all {} {
 		exp_continue
 	    }
 	    -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" {
-		lappend test_list [multi_line ".*sleep.*" \
-					      ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \
+		lappend test_list [multi_line ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \
 					      ".*signal_handler.*" \
 					      ".*signal handler called.*" \
-					      ".*pthread_kill.*" \
+					      ".*" \
 					      ".*thread_function.*"]
 		exp_continue
 	    }
 	    -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" {
-		lappend test_list [multi_line ".*sleep.*" \
-					      ".*do_syscall_task .location=SIGNAL_HANDLER.*" \
+		lappend test_list [multi_line ".*do_syscall_task .location=SIGNAL_HANDLER.*" \
 					      ".*signal_handler.*" \
 					      ".*signal handler called.*" \
-					      ".*pthread_kill.*" \
+					      ".*" \
 					      ".*thread_function.*"]
 		exp_continue
 	    }
 	    -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" {
-		lappend test_list [multi_line ".*sleep.*" \
-					      ".*do_syscall_task .location=NORMAL.*" \
+		lappend test_list [multi_line ".*do_syscall_task .location=NORMAL.*" \
 					      ".*thread_function.*"]
 		exp_continue
 	    }
@@ -67,7 +64,7 @@ proc thread_apply_all {} {
 		lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_ALT_STACK.*" \
 					      ".*signal_handler.*" \
 					      ".*signal handler called.*" \
-					      ".*pthread_kill.*" \
+					      ".*" \
 					      ".*thread_function.*"]
 		exp_continue
 	    }
@@ -75,7 +72,7 @@ proc thread_apply_all {} {
 		lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_HANDLER.*" \
 					      ".*signal_handler.*" \
 					      ".*signal handler called.*" \
-					      ".*pthread_kill.*" \
+					      ".*" \
 					      ".*thread_function.*"]
 		exp_continue
 	    }
-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets
  2024-02-14  9:17 ` [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Guinevere Larsen
@ 2024-02-15 14:37   ` Lancelot SIX
  2024-03-08 10:01   ` Tom de Vries
  1 sibling, 0 replies; 10+ messages in thread
From: Lancelot SIX @ 2024-02-15 14:37 UTC (permalink / raw)
  To: Guinevere Larsen; +Cc: gdb-patches

Oups,

I replied to the V2 before I saw a V3 was available and the V3 addresses
the point I raised!

Please discard my previous message, and FWIW this version looks good to me.

Reviewed-By: Lancelot Six <lancelot.six@amd.com>

On Wed, Feb 14, 2024 at 10:17:12AM +0100, Guinevere Larsen wrote:
> There are 2 issues with the test gdb.threads/threadcrash.exp on arm
> targets, both relating to issues in how the targets handles gcores. The
> first is that the test fails to cout the number of threads in the
> inferior and the second is that GDB can't properly backtrace from a
> gcore.
> 
> The first error is fixed on this commit by getting the convenience
> variable _inferior_thread_count as opposed to calculating it based on
> the output of "info threads"
> 
> For the second, this test just emits a single xfail referring back to PR
> corefiles/31294, which tracks the issues with gcores in 32-bit arm
> targets.
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31294
> ---
>  gdb/testsuite/gdb.threads/threadcrash.exp | 29 ++++++-----------------
>  1 file changed, 7 insertions(+), 22 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
> index 996e020d1e8..bf4534179e2 100644
> --- a/gdb/testsuite/gdb.threads/threadcrash.exp
> +++ b/gdb/testsuite/gdb.threads/threadcrash.exp
> @@ -20,26 +20,6 @@
>  # a gcore.
>  
>  
> -# Check that the inferior has 7 threads, and return the number of threads (7).
> -# We return the thread count so that, even if there is some error in the test,
> -# the final log doesn't get flooded with failures.
> -
> -proc test_thread_count {} {
> -    set thread_count 0
> -
> -    gdb_test_multiple "info threads" "getting thread count" -lbl {
> -	-re "Thread" {
> -	    incr thread_count
> -	    exp_continue
> -	}
> -	-re "$::gdb_prompt " {
> -	    gdb_assert {$thread_count == 7}
> -	}
> -    }
> -
> -    return $thread_count
> -}
> -
>  # Use 'thread apply all backtrace' to check if all expected threads
>  # are present, and stopped in the expected locations.  Set the global
>  # TEST_LIST to be the a list of regexps expected to match all the
> @@ -123,7 +103,8 @@ proc thread_apply_all {} {
>  
>  proc do_full_test {} {
>      global test_list
> -    set thread_count [test_thread_count]
> +    set thread_count [get_valueof "" "\$_inferior_thread_count" 0]
> +    gdb_assert {$thread_count == 7}
>  
>      thread_apply_all
>  
> @@ -230,4 +211,8 @@ test_live_inferior
>  
>  test_corefile
>  
> -test_gcore
> +if { [is_aarch32_target] } {
> +    kfail "gcore tests fail on 32-bit arm, see PR corefiles/31294"
> +} else {
> +    test_gcore
> +}
> 
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PING][PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp
  2024-02-14  9:17 [PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp Guinevere Larsen
  2024-02-14  9:17 ` [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Guinevere Larsen
  2024-02-14  9:17 ` [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols Guinevere Larsen
@ 2024-03-06 13:02 ` Guinevere Larsen
  2 siblings, 0 replies; 10+ messages in thread
From: Guinevere Larsen @ 2024-03-06 13:02 UTC (permalink / raw)
  To: Guinevere Larsen, Gdb-patches; +Cc: Tom de Vries

On 14/02/2024 10:17, Guinevere Larsen wrote:
> The test was recently pushed to master but it had a couple of small
> issues. This is a quick series to fix the 2 major issues that were
> brought up to my attention.
>
> Changes for v3:
> * use get_valueof to get thread count, to stop a failure on Linaro's CI.
>
> Changes for v2:
> * changed xfail from patch 1 to a kfail
>
> Guinevere Larsen (2):
>    gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets
>    gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc
>      symbols
>
>   gdb/testsuite/gdb.threads/threadcrash.exp | 46 +++++++----------------
>   1 file changed, 14 insertions(+), 32 deletions(-)
>
Ping!

Adding Tom de Vries to CC since he commented on one of the related bugs 
(testsuite/31293)

-- 
Cheers,
Guinevere Larsen
She/Her/Hers


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols
  2024-02-14  9:17 ` [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols Guinevere Larsen
@ 2024-03-06 17:16   ` Tom de Vries
  2024-03-07  9:11     ` Guinevere Larsen
  0 siblings, 1 reply; 10+ messages in thread
From: Tom de Vries @ 2024-03-06 17:16 UTC (permalink / raw)
  To: Guinevere Larsen, gdb-patches

On 2/14/24 10:17, Guinevere Larsen wrote:
> The test gdb.threads/threadcrash.exp demanded GDB to fully unwind and
> print the names of all functions. However, some of the functions are
> from the libc library, and so the test implicitly demanded libc symbols
> to be available, and would fail otherwise, as was raised in PR
> gdb/31293.
> 
> This commit changes it so we only explicitly check for functions that
> are provided by threadcrash.c to fix that

Hi Gwen,

Nit: Missing dot at end of line.

With that fixed, LGTM.

Approved-By: Tom de Vries <tdevries@suse.de>

Thanks,
- Tom

> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31293
> ---
>   gdb/testsuite/gdb.threads/threadcrash.exp | 17 +++++++----------
>   1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
> index bf4534179e2..2bbedcce58e 100644
> --- a/gdb/testsuite/gdb.threads/threadcrash.exp
> +++ b/gdb/testsuite/gdb.threads/threadcrash.exp
> @@ -40,26 +40,23 @@ proc thread_apply_all {} {
>   		exp_continue
>   	    }
>   	    -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" {
> -		lappend test_list [multi_line ".*sleep.*" \
> -					      ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \
> +		lappend test_list [multi_line ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \
>   					      ".*signal_handler.*" \
>   					      ".*signal handler called.*" \
> -					      ".*pthread_kill.*" \
> +					      ".*" \
>   					      ".*thread_function.*"]
>   		exp_continue
>   	    }
>   	    -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" {
> -		lappend test_list [multi_line ".*sleep.*" \
> -					      ".*do_syscall_task .location=SIGNAL_HANDLER.*" \
> +		lappend test_list [multi_line ".*do_syscall_task .location=SIGNAL_HANDLER.*" \
>   					      ".*signal_handler.*" \
>   					      ".*signal handler called.*" \
> -					      ".*pthread_kill.*" \
> +					      ".*" \
>   					      ".*thread_function.*"]
>   		exp_continue
>   	    }
>   	    -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" {
> -		lappend test_list [multi_line ".*sleep.*" \
> -					      ".*do_syscall_task .location=NORMAL.*" \
> +		lappend test_list [multi_line ".*do_syscall_task .location=NORMAL.*" \
>   					      ".*thread_function.*"]
>   		exp_continue
>   	    }
> @@ -67,7 +64,7 @@ proc thread_apply_all {} {
>   		lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_ALT_STACK.*" \
>   					      ".*signal_handler.*" \
>   					      ".*signal handler called.*" \
> -					      ".*pthread_kill.*" \
> +					      ".*" \
>   					      ".*thread_function.*"]
>   		exp_continue
>   	    }
> @@ -75,7 +72,7 @@ proc thread_apply_all {} {
>   		lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_HANDLER.*" \
>   					      ".*signal_handler.*" \
>   					      ".*signal handler called.*" \
> -					      ".*pthread_kill.*" \
> +					      ".*" \
>   					      ".*thread_function.*"]
>   		exp_continue
>   	    }


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols
  2024-03-06 17:16   ` Tom de Vries
@ 2024-03-07  9:11     ` Guinevere Larsen
  2024-03-07 18:23       ` Tom de Vries
  0 siblings, 1 reply; 10+ messages in thread
From: Guinevere Larsen @ 2024-03-07  9:11 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 06/03/2024 18:16, Tom de Vries wrote:
> On 2/14/24 10:17, Guinevere Larsen wrote:
>> The test gdb.threads/threadcrash.exp demanded GDB to fully unwind and
>> print the names of all functions. However, some of the functions are
>> from the libc library, and so the test implicitly demanded libc symbols
>> to be available, and would fail otherwise, as was raised in PR
>> gdb/31293.
>>
>> This commit changes it so we only explicitly check for functions that
>> are provided by threadcrash.c to fix that
>
> Hi Gwen,
>
> Nit: Missing dot at end of line.
>
> With that fixed, LGTM.
>
> Approved-By: Tom de Vries <tdevries@suse.de>

Thanks for the review!

Would this apply to both patches or just this second one?

-- 
Cheers,
Guinevere Larsen
She/Her/Hers

>
> Thanks,
> - Tom
>
>>
>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31293
>> ---
>>   gdb/testsuite/gdb.threads/threadcrash.exp | 17 +++++++----------
>>   1 file changed, 7 insertions(+), 10 deletions(-)
>>
>> diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp 
>> b/gdb/testsuite/gdb.threads/threadcrash.exp
>> index bf4534179e2..2bbedcce58e 100644
>> --- a/gdb/testsuite/gdb.threads/threadcrash.exp
>> +++ b/gdb/testsuite/gdb.threads/threadcrash.exp
>> @@ -40,26 +40,23 @@ proc thread_apply_all {} {
>>           exp_continue
>>           }
>>           -re "\[^\n\]*syscall_task 
>> .location=SIGNAL_ALT_STACK\[^\n\]*" {
>> -        lappend test_list [multi_line ".*sleep.*" \
>> -                          ".*do_syscall_task 
>> .location=SIGNAL_ALT_STACK.*" \
>> +        lappend test_list [multi_line ".*do_syscall_task 
>> .location=SIGNAL_ALT_STACK.*" \
>>                             ".*signal_handler.*" \
>>                             ".*signal handler called.*" \
>> -                          ".*pthread_kill.*" \
>> +                          ".*" \
>>                             ".*thread_function.*"]
>>           exp_continue
>>           }
>>           -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" {
>> -        lappend test_list [multi_line ".*sleep.*" \
>> -                          ".*do_syscall_task 
>> .location=SIGNAL_HANDLER.*" \
>> +        lappend test_list [multi_line ".*do_syscall_task 
>> .location=SIGNAL_HANDLER.*" \
>>                             ".*signal_handler.*" \
>>                             ".*signal handler called.*" \
>> -                          ".*pthread_kill.*" \
>> +                          ".*" \
>>                             ".*thread_function.*"]
>>           exp_continue
>>           }
>>           -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" {
>> -        lappend test_list [multi_line ".*sleep.*" \
>> -                          ".*do_syscall_task .location=NORMAL.*" \
>> +        lappend test_list [multi_line ".*do_syscall_task 
>> .location=NORMAL.*" \
>>                             ".*thread_function.*"]
>>           exp_continue
>>           }
>> @@ -67,7 +64,7 @@ proc thread_apply_all {} {
>>           lappend test_list [multi_line ".*do_spin_task 
>> .location=SIGNAL_ALT_STACK.*" \
>>                             ".*signal_handler.*" \
>>                             ".*signal handler called.*" \
>> -                          ".*pthread_kill.*" \
>> +                          ".*" \
>>                             ".*thread_function.*"]
>>           exp_continue
>>           }
>> @@ -75,7 +72,7 @@ proc thread_apply_all {} {
>>           lappend test_list [multi_line ".*do_spin_task 
>> .location=SIGNAL_HANDLER.*" \
>>                             ".*signal_handler.*" \
>>                             ".*signal handler called.*" \
>> -                          ".*pthread_kill.*" \
>> +                          ".*" \
>>                             ".*thread_function.*"]
>>           exp_continue
>>           }
>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols
  2024-03-07  9:11     ` Guinevere Larsen
@ 2024-03-07 18:23       ` Tom de Vries
  0 siblings, 0 replies; 10+ messages in thread
From: Tom de Vries @ 2024-03-07 18:23 UTC (permalink / raw)
  To: Guinevere Larsen, gdb-patches

On 3/7/24 10:11, Guinevere Larsen wrote:
> On 06/03/2024 18:16, Tom de Vries wrote:
>> On 2/14/24 10:17, Guinevere Larsen wrote:
>>> The test gdb.threads/threadcrash.exp demanded GDB to fully unwind and
>>> print the names of all functions. However, some of the functions are
>>> from the libc library, and so the test implicitly demanded libc symbols
>>> to be available, and would fail otherwise, as was raised in PR
>>> gdb/31293.
>>>
>>> This commit changes it so we only explicitly check for functions that
>>> are provided by threadcrash.c to fix that
>>
>> Hi Gwen,
>>
>> Nit: Missing dot at end of line.
>>
>> With that fixed, LGTM.
>>
>> Approved-By: Tom de Vries <tdevries@suse.de>
> 
> Thanks for the review!
> 
> Would this apply to both patches or just this second one?
> 

Just this one, but after looking at the other patch, I realize also this 
patch is not ideal: if there are libc symbols for sleep and pthread_kill 
in the live_inferior case, they also should be there for the other cases.

I'm working on a patch series based on yours, addressing this and a few 
more issues, hoping to submit tomorrow.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets
  2024-02-14  9:17 ` [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Guinevere Larsen
  2024-02-15 14:37   ` Lancelot SIX
@ 2024-03-08 10:01   ` Tom de Vries
  2024-03-08 10:12     ` Tom de Vries
  1 sibling, 1 reply; 10+ messages in thread
From: Tom de Vries @ 2024-03-08 10:01 UTC (permalink / raw)
  To: Guinevere Larsen, gdb-patches

On 2/14/24 10:17, Guinevere Larsen wrote:
> -test_gcore
> +if { [is_aarch32_target] } {
> +    kfail "gcore tests fail on 32-bit arm, see PR corefiles/31294"
> +} else {
> +    test_gcore
> +}

The xfail and kfail procs don't have the same args:
...
$ egrep -d skip "proc (xfail|kfail)" /usr/share/dejagnu/*
/usr/share/dejagnu/framework.exp:proc xfail { message } {
/usr/share/dejagnu/framework.exp:proc kfail { bugid message } {
...
and consequently this patch runs into an error.

Furthermore, I don't run into the reported problem on my setup (pinebook 
aarch64 manjaro, chroot debian 32-bit), so this style of kfail actually 
prevents me from successfully running the tests.

I proposed a more precise fix in v4, though I can't test it ...

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets
  2024-03-08 10:01   ` Tom de Vries
@ 2024-03-08 10:12     ` Tom de Vries
  0 siblings, 0 replies; 10+ messages in thread
From: Tom de Vries @ 2024-03-08 10:12 UTC (permalink / raw)
  To: Guinevere Larsen, gdb-patches

On 3/8/24 11:01, Tom de Vries wrote:
> On 2/14/24 10:17, Guinevere Larsen wrote:
>> -test_gcore
>> +if { [is_aarch32_target] } {
>> +    kfail "gcore tests fail on 32-bit arm, see PR corefiles/31294"
>> +} else {
>> +    test_gcore
>> +}
> 
> The xfail and kfail procs don't have the same args:
> ...
> $ egrep -d skip "proc (xfail|kfail)" /usr/share/dejagnu/*
> /usr/share/dejagnu/framework.exp:proc xfail { message } {
> /usr/share/dejagnu/framework.exp:proc kfail { bugid message } {
> ...
> and consequently this patch runs into an error.
> 

And ... I just realized I made the same mistake in v4.  I already 
spotted another mistake, I intended to bail out after the kfail and 
forgot to add that.  I'll follow up on the patch once it arrives on the ml.

Thanks,
- Tom

> Furthermore, I don't run into the reported problem on my setup (pinebook 
> aarch64 manjaro, chroot debian 32-bit), so this style of kfail actually 
> prevents me from successfully running the tests.
> 
> I proposed a more precise fix in v4, though I can't test it ...
> 
> Thanks,
> - Tom


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-08 12:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14  9:17 [PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp Guinevere Larsen
2024-02-14  9:17 ` [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Guinevere Larsen
2024-02-15 14:37   ` Lancelot SIX
2024-03-08 10:01   ` Tom de Vries
2024-03-08 10:12     ` Tom de Vries
2024-02-14  9:17 ` [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols Guinevere Larsen
2024-03-06 17:16   ` Tom de Vries
2024-03-07  9:11     ` Guinevere Larsen
2024-03-07 18:23       ` Tom de Vries
2024-03-06 13:02 ` [PING][PATCH v3 0/2] Fixes to gdb.threads/threadcrash.exp Guinevere Larsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).