* [PATCH] gdb/testsuite: avoid register values in test names
@ 2026-11-24 11:12 Andrew Burgess
2026-11-24 12:28 ` Rohr, Stephan
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Burgess @ 2026-11-24 11:12 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
The test gdb.arch/amd64-extended-prologue-analysis.exp places modified
callee-saved register values into test names. I find that if I run
this test from different directories then I often see different values,
and this messes up my test result comparison scripts.
Different values could be triggered by, for example, different
environment blocks on the stack, and indeed, within a single directory,
if I run the test, then set a large environment variable, and finally
re-run the test, the second test run will have different register values
than the first run.
Replace the register values with fixed text strings. Now the test names
are stable across runs.
---
.../gdb.arch/amd64-extended-prologue-analysis.exp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
index d511c773dc3..f34e5cc2390 100644
--- a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
+++ b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
@@ -38,7 +38,7 @@ proc test_run {} {
gdb_assert { $main_r12 ne "null" }
set foo_r12 [expr {$main_r12 + 2}]
- gdb_test "print \$r12=$foo_r12" "$foo_r12" "Set foo's %r12=$foo_r12"
+ gdb_test "print \$r12=$foo_r12" "$foo_r12" "Set foo's %r12 to a new value"
gdb_test "up" ".*main.*" "Go up a frame from foo"
gdb_test "print \$r12" "$main_r12" "foo's %r12 unwound"
gdb_test "down" ".*foo.*" "Go back down a frame to foo"
@@ -53,9 +53,9 @@ proc offset_test_run {} {
gdb_assert { $old_reg_val ne "null" }
set new_reg_val [expr {$old_reg_val + 3}]
- gdb_test "print \$r14=$new_reg_val" "$new_reg_val" "Set %r14=$new_reg_val"
- gdb_test "print \$r13=$new_reg_val" "$new_reg_val" "Set %r13=$new_reg_val"
- gdb_test "print \$r12=$new_reg_val" "$new_reg_val" "Set %r12=$new_reg_val"
+ gdb_test "print \$r14=$new_reg_val" "$new_reg_val" "Set %r14 to a new value"
+ gdb_test "print \$r13=$new_reg_val" "$new_reg_val" "Set %r13 to a new value"
+ gdb_test "print \$r12=$new_reg_val" "$new_reg_val" "Set %r12 to a new value"
set addr_past_prologue "null"
gdb_test_multiple "disassemble" "Disassemble foo" -lbl {
base-commit: c7b0ebeb53518dbdc27624ece3f0581cc3cc33e6
--
2.56.1
^ permalink raw reply [flat|nested] 2+ messages in thread* RE: [PATCH] gdb/testsuite: avoid register values in test names
2026-11-24 11:12 [PATCH] gdb/testsuite: avoid register values in test names Andrew Burgess
@ 2026-11-24 12:28 ` Rohr, Stephan
0 siblings, 0 replies; 2+ messages in thread
From: Rohr, Stephan @ 2026-11-24 12:28 UTC (permalink / raw)
To: Andrew Burgess, gdb-patches
Hi Andrew,
this looks good, thanks.
Reviewed-By: Stephan Rohr <stephan.rohr@intel.com>
> -----Original Message-----
> From: Andrew Burgess <aburgess@redhat.com>
> Sent: Tuesday, 24 November 2026 12:13
> To: gdb-patches@sourceware.org
> Cc: Andrew Burgess <aburgess@redhat.com>
> Subject: [PATCH] gdb/testsuite: avoid register values in test names
>
> The test gdb.arch/amd64-extended-prologue-analysis.exp places modified
> callee-saved register values into test names. I find that if I run
> this test from different directories then I often see different values,
> and this messes up my test result comparison scripts.
>
> Different values could be triggered by, for example, different
> environment blocks on the stack, and indeed, within a single directory,
> if I run the test, then set a large environment variable, and finally
> re-run the test, the second test run will have different register values
> than the first run.
>
> Replace the register values with fixed text strings. Now the test names
> are stable across runs.
> ---
> .../gdb.arch/amd64-extended-prologue-analysis.exp | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
> b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
> index d511c773dc3..f34e5cc2390 100644
> --- a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
> +++ b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
> @@ -38,7 +38,7 @@ proc test_run {} {
> gdb_assert { $main_r12 ne "null" }
>
> set foo_r12 [expr {$main_r12 + 2}]
> - gdb_test "print \$r12=$foo_r12" "$foo_r12" "Set foo's %r12=$foo_r12"
> + gdb_test "print \$r12=$foo_r12" "$foo_r12" "Set foo's %r12 to a new
> value"
> gdb_test "up" ".*main.*" "Go up a frame from foo"
> gdb_test "print \$r12" "$main_r12" "foo's %r12 unwound"
> gdb_test "down" ".*foo.*" "Go back down a frame to foo"
> @@ -53,9 +53,9 @@ proc offset_test_run {} {
> gdb_assert { $old_reg_val ne "null" }
>
> set new_reg_val [expr {$old_reg_val + 3}]
> - gdb_test "print \$r14=$new_reg_val" "$new_reg_val" "Set
> %r14=$new_reg_val"
> - gdb_test "print \$r13=$new_reg_val" "$new_reg_val" "Set
> %r13=$new_reg_val"
> - gdb_test "print \$r12=$new_reg_val" "$new_reg_val" "Set
> %r12=$new_reg_val"
> + gdb_test "print \$r14=$new_reg_val" "$new_reg_val" "Set %r14 to a new
> value"
> + gdb_test "print \$r13=$new_reg_val" "$new_reg_val" "Set %r13 to a new
> value"
> + gdb_test "print \$r12=$new_reg_val" "$new_reg_val" "Set %r12 to a new
> value"
>
> set addr_past_prologue "null"
> gdb_test_multiple "disassemble" "Disassemble foo" -lbl {
>
> base-commit: c7b0ebeb53518dbdc27624ece3f0581cc3cc33e6
> --
> 2.56.1
________________________________________
Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 (89) 99143-0
www.intel.de
Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman
Chairperson of the Supervisory Board: Sonja Pierer
Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 12:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 11:12 [PATCH] gdb/testsuite: avoid register values in test names Andrew Burgess
2026-11-24 12:28 ` Rohr, Stephan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox