[binutils-gdb] [gdb/testsuite] Stabilize test name in gdb.base/style.exp

Tom de Vries vries@sourceware.org
Thu Jul 17 20:06:46 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=802963162e97e7fb5a8491503821d8b8b38f933f

commit 802963162e97e7fb5a8491503821d8b8b38f933f
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Jul 17 22:06:38 2025 +0200

    [gdb/testsuite] Stabilize test name in gdb.base/style.exp
    
    With test-case gdb.base/style.exp, I get:
    ...
    PASS: gdb.base/style.exp: set width 88
    ...
    
    The 88 is not a constant, it's a variable:
    ...
    gdb_test_no_output "set width $desired_width"
    ...
    which is calculated by parsing the output of "info files".
    
    When running with target board unix/-m32, I get instead:
    ...
    PASS: gdb.base/style.exp: set width 67
    ...
    
    Stabilize the test name by using instead:
    ...
    PASS: gdb.base/style.exp: set width to desired width
    ...
    
    Tested on x86_64-linux.
    
    Approved-By: Andrew Burgess <aburgess@redhat.com>

Diff:
---
 gdb/testsuite/gdb.base/style.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index 503671be8e6..514c3e87399 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -924,7 +924,8 @@ proc test_pagination_prompt_styling {} {
     }
 
     # Now setup the screen width.
-    gdb_test_no_output "set width $desired_width"
+    gdb_test_no_output "set width $desired_width" \
+	"set width to desired width"
 
     # Re-run 'info files'.  Check that the content before any
     # pagination prompt correctly disables styling.


More information about the Gdb-cvs mailing list