public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste
@ 2022-10-07  8:20 vries at gcc dot gnu.org
  2022-10-07  8:22 ` [Bug testsuite/29659] " vries at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-07  8:20 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

            Bug ID: 29659
           Summary: [gdb/testsuite] local-remote-host timeouts with
                    bracketed-paste
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

[ Note: not building with system-readline, so picking up the readline version
in the sources. ]

[ Note: There are some problems with the mentioned host boards and/or
test-case, so it may be necessary to first run the test-case with native to
generate some files that will be otherwise not found, and it may be necessary
to do git ch -f to recreate $src/gdb/testsuite/gdb.xml/trivial.xml if running
the test deleted this file. ]

With test-case gdb.server/connect-with-no-symbol-file.exp and host board
local-remote-host-notty, I have:
...
Type "apropos word" to search for commands related to "word".^M
(gdb) set height 0^M
(gdb) set width 0^M
(gdb) disconnect^M
You can't do that when your target is `None'^M
...
but with host board local-remote-host instead I have:
...
Type "apropos word" to search for commands related to "word".^M
^[[?2004h(gdb) set height 0^M
^[[?2004l^M^[[?2004h(gdb) set width 0^M
^[[?2004l^M^[[?2004h(gdb) disconnect^M
^[[?2004l^MYou can't do that when your target is `None'^M
^[[?2004h(gdb) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=:
action=permission: setup: disconnect (timeout)
...

I found that the control sequences ^[[?2004h and ^[[?2004l are related to
bracketed paste mode.

After doing a rebuild with the commit before the readline 8.1 import (which
sets the bracketed-paste mode on by default) and applying commit 8d08cccb014
("Avoid having to unload file in gdb.server/connect-with-no-symbol-file.exp")
to have the same test-case, I have instead:
...
Type "apropos word" to search for commands related to "word".^M
(gdb) set height 0^M
(gdb) set width 0^M
(gdb) disconnect^M
You can't do that when your target is `None'^M
(gdb) PASS: gdb.server/connect-with-no-symbol-file.exp: sysroot=:
action=permission: setup: disconnect
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
@ 2022-10-07  8:22 ` vries at gcc dot gnu.org
  2022-10-07  8:35 ` vries at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-07  8:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Note that the "set height 0" is executed without problems, because the prompt
matching is not as strict as the one of gdb_test/gdb_test_multiple:
...
    send_gdb "set height 0\n"
    gdb_expect 10 {
        -re "$gdb_prompt $" {
            verbose "Setting height to 0." 2
        }
        timeout {
            warning "Couldn't set the height to 0"
        }
    }
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
  2022-10-07  8:22 ` [Bug testsuite/29659] " vries at gcc dot gnu.org
@ 2022-10-07  8:35 ` vries at gcc dot gnu.org
  2022-10-07 10:06 ` vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-07  8:35 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Adding "set enable-bracketed-paste off" to ~/.inputrc makes the test pass.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
  2022-10-07  8:22 ` [Bug testsuite/29659] " vries at gcc dot gnu.org
  2022-10-07  8:35 ` vries at gcc dot gnu.org
@ 2022-10-07 10:06 ` vries at gcc dot gnu.org
  2022-10-07 10:09 ` vries at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-07 10:06 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
> With test-case gdb.server/connect-with-no-symbol-file.exp and host board
> local-remote-host-notty, I have:
> ...
> Type "apropos word" to search for commands related to "word".^M
> (gdb) set height 0^M
> (gdb) set width 0^M
> (gdb) disconnect^M
> You can't do that when your target is `None'^M
> ...

Hmm, occasionally I also run into:
...
Type "apropos word" to search for commands related to "word".^M
(gdb) set height 0^M
(gdb) set width 0^M
(gdb) disconnect^M
You can't do that when your target is `None'(gdb) ^M
FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=permission:
setup: disconnect (timeout)
...
So, a "\n" seems to have gone missing.

Hmm, that seems to be fixed by:
...
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index fdb65b3dc4b..fa962964042 100644
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -85,6 +85,7 @@ print_exception (struct ui_file *file, const struct gdb_exc
eption &e)
        }
     }                                      
   gdb_printf (file, "\n");
+  print_flush ();

   /* Now append the annotation.  */
   switch (e.reason)
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-10-07 10:06 ` vries at gcc dot gnu.org
@ 2022-10-07 10:09 ` vries at gcc dot gnu.org
  2022-10-08 17:23 ` tromey at sourceware dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-07 10:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #3)
> > With test-case gdb.server/connect-with-no-symbol-file.exp and host board
> > local-remote-host-notty, I have:
> > ...
> > Type "apropos word" to search for commands related to "word".^M
> > (gdb) set height 0^M
> > (gdb) set width 0^M
> > (gdb) disconnect^M
> > You can't do that when your target is `None'^M
> > ...
> 
> Hmm, occasionally I also run into:
> ...
> Type "apropos word" to search for commands related to "word".^M
> (gdb) set height 0^M
> (gdb) set width 0^M
> (gdb) disconnect^M
> You can't do that when your target is `None'(gdb) ^M
> FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=:
> action=permission: setup: disconnect (timeout)
> ...
> So, a "\n" seems to have gone missing.
> 
> Hmm, that seems to be fixed by:
> ...
> diff --git a/gdb/exceptions.c b/gdb/exceptions.c
> index fdb65b3dc4b..fa962964042 100644
> --- a/gdb/exceptions.c
> +++ b/gdb/exceptions.c
> @@ -85,6 +85,7 @@ print_exception (struct ui_file *file, const struct gdb_exc
> eption &e)
>         }
>      }                                      
>    gdb_printf (file, "\n");
> +  print_flush ();
>  
>    /* Now append the annotation.  */
>    switch (e.reason)
> ...

Well, not fixed but maybe less likely to occur.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-10-07 10:09 ` vries at gcc dot gnu.org
@ 2022-10-08 17:23 ` tromey at sourceware dot org
  2022-10-09  8:56 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at sourceware dot org @ 2022-10-08 17:23 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Tom de Vries from comment #2)
> Adding "set enable-bracketed-paste off" to ~/.inputrc makes the test pass.

The test suite could make a .inputrc and set INPUTRC.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-10-08 17:23 ` tromey at sourceware dot org
@ 2022-10-09  8:56 ` vries at gcc dot gnu.org
  2022-10-10 16:13 ` tromey at sourceware dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-09  8:56 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #5)
> (In reply to Tom de Vries from comment #2)
> > Adding "set enable-bracketed-paste off" to ~/.inputrc makes the test pass.
> 
> The test suite could make a .inputrc and set INPUTRC.

Indeed.  What I don't understand yet is whether this would be a gdb testsuite
fix or a workaround for a gdb / readline /ssh bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-10-09  8:56 ` vries at gcc dot gnu.org
@ 2022-10-10 16:13 ` tromey at sourceware dot org
  2022-10-12  4:04 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at sourceware dot org @ 2022-10-10 16:13 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Tom de Vries from comment #6)

> Indeed.  What I don't understand yet is whether this would be a gdb
> testsuite fix or a workaround for a gdb / readline /ssh bug.

Yes, this situation seems quite strange to me as well, and I don't
have a theory for why it would happen.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-10-10 16:13 ` tromey at sourceware dot org
@ 2022-10-12  4:04 ` vries at gcc dot gnu.org
  2022-10-17 13:02 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-12  4:04 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> generate some files that will be otherwise not found, and it may be
> necessary to do git ch -f to recreate $src/gdb/testsuite/gdb.xml/trivial.xml
> if running the test deleted this file. ]

Fixed by
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=7808a1f7f68cb38f66cf44bb91faae29b0dbfedd
.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-10-12  4:04 ` vries at gcc dot gnu.org
@ 2022-10-17 13:02 ` vries at gcc dot gnu.org
  2022-10-17 13:05 ` vries at gcc dot gnu.org
  2022-10-17 13:06 ` vries at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-17 13:02 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #9 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #7)
> (In reply to Tom de Vries from comment #6)
> 
> > Indeed.  What I don't understand yet is whether this would be a gdb
> > testsuite fix or a workaround for a gdb / readline /ssh bug.
> 
> Yes, this situation seems quite strange to me as well, and I don't
> have a theory for why it would happen.

I think it's a testsuite bug.

We have:
...
    setenv INPUTRC [cached_file inputrc "set enable-bracketed-paste off"]
...
but that sets the environment on the build rather than the host, so it's not
effective for remote host.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-10-17 13:02 ` vries at gcc dot gnu.org
@ 2022-10-17 13:05 ` vries at gcc dot gnu.org
  2022-10-17 13:06 ` vries at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-17 13:05 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
And we have a similar problem with DEBUGINFOD_URLS.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/29659] [gdb/testsuite] local-remote-host timeouts with bracketed-paste
  2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2022-10-17 13:05 ` vries at gcc dot gnu.org
@ 2022-10-17 13:06 ` vries at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-17 13:06 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29659

--- Comment #11 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #10)
> And we have a similar problem with DEBUGINFOD_URLS.

Fixed by:
...
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index bfa9fec628e..5c9d9f84da3 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5863,6 +5863,8 @@ proc default_gdb_init { test_file_name } {
     # If DEBUGINFOD_URLS is set, gdb will try to download sources and
     # debug info for f.i. system libraries.  Prevent this.
     unset -nocomplain ::env(DEBUGINFOD_URLS)
+    global INTERNAL_GDBFLAGS
+    append INTERNAL_GDBFLAGS " -iex \"set debuginfod enabled off\""

     # Ensure that GDBHISTFILE and GDBHISTSIZE are removed from the
     # environment, we don't want these modifications to the history
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2022-10-17 13:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07  8:20 [Bug testsuite/29659] New: [gdb/testsuite] local-remote-host timeouts with bracketed-paste vries at gcc dot gnu.org
2022-10-07  8:22 ` [Bug testsuite/29659] " vries at gcc dot gnu.org
2022-10-07  8:35 ` vries at gcc dot gnu.org
2022-10-07 10:06 ` vries at gcc dot gnu.org
2022-10-07 10:09 ` vries at gcc dot gnu.org
2022-10-08 17:23 ` tromey at sourceware dot org
2022-10-09  8:56 ` vries at gcc dot gnu.org
2022-10-10 16:13 ` tromey at sourceware dot org
2022-10-12  4:04 ` vries at gcc dot gnu.org
2022-10-17 13:02 ` vries at gcc dot gnu.org
2022-10-17 13:05 ` vries at gcc dot gnu.org
2022-10-17 13:06 ` vries at gcc dot gnu.org

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