Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Rohr, Stephan" <stephan.rohr@intel.com>
To: Andrew Burgess <aburgess@redhat.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH] gdb/testsuite: avoid register values in test names
Date: Tue, 24 Nov 2026 12:28:07 +0000	[thread overview]
Message-ID: <IA3PR11MB444632A3C2C8B694BEFC76994A93442@IA3PR11MB444632.namprd11.prod.outlook.com> (raw)
In-Reply-To: <0ac8655e6786eb29f91f987edbb6d2b7dc4be8cd.1795518754.git.aburgess@redhat.com>

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.

      reply	other threads:[~2026-11-24 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 11:12 Andrew Burgess
2026-11-24 12:28 ` Rohr, Stephan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=IA3PR11MB444632A3C2C8B694BEFC76994A93442@IA3PR11MB444632.namprd11.prod.outlook.com \
    --to=stephan.rohr@intel.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox