public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: handle long filenames in gdb.base/startup-with-shell.exp
@ 2024-01-17 15:38 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2024-01-17 15:38 UTC (permalink / raw)
  To: gdb-cvs

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

commit 52498004a34dfa4bc55fbf791a4ed4e81599a436
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Wed Jan 17 09:53:16 2024 +0000

    gdb/testsuite: handle long filenames in gdb.base/startup-with-shell.exp
    
    I got a report of a failure from Linaro's CI testing for the test
    gdb.base/startup-with-shell.exp.
    
    Looking at the log I see this:
    
      (gdb) PASS: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = *.unique-extension: inferior started
      print argv[1]
      $1 = 0xfffed978 "/home/tcwg-build/workspace/tcwg_gnu_4/abe/builds/armv8l-unknown-linux-gnueabihf/armv8l-unknown-linux-gnueabihf/gdb-gdb.git~master/gdb/testsuite/outputs/gdb.base/startup-with-shell/unique-file.unique-e"...
      (gdb) FAIL: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = *.unique-extension: first argument expanded
    
    Notice that the value of $1 was truncated (indicated by the trailing
    ellipses), and as a result it isn't going to match the expected output
    pattern.
    
    Avoid this by adding a call to 'set print characters unlimited' which
    allows GDB to print strings of any length.
    
    Approved-By: Tom de Vries <tdevries@suse.de>

Diff:
---
 gdb/testsuite/gdb.base/startup-with-shell.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/gdb.base/startup-with-shell.exp b/gdb/testsuite/gdb.base/startup-with-shell.exp
index b73d5d740f5..d5ec503dceb 100644
--- a/gdb/testsuite/gdb.base/startup-with-shell.exp
+++ b/gdb/testsuite/gdb.base/startup-with-shell.exp
@@ -59,6 +59,7 @@ proc initial_setup_simple { startup_with_shell run_args } {
 
 with_test_prefix "startup_with_shell = on; run_args = *.unique-extension" {
     initial_setup_simple "on" "$unique_file_dir/*.unique-extension"
+    gdb_test_no_output "set print characters unlimited"
     gdb_test "print argv\[1\]" "\\\$$decimal = $hex \"$unique_file\"" \
 	"first argument expanded"
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-17 15:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17 15:38 [binutils-gdb] gdb/testsuite: handle long filenames in gdb.base/startup-with-shell.exp Andrew Burgess

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).