public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Disable styling in host board local-remote-host.exp
Date: Fri, 14 Oct 2022 17:59:30 +0000 (GMT)	[thread overview]
Message-ID: <20221014175930.8AABD3858CDA@sourceware.org> (raw)

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

commit 17c68d98f74b98704bf5a934dd6a0356a1e08802
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Oct 14 19:59:26 2022 +0200

    [gdb/testsuite] Disable styling in host board local-remote-host.exp
    
    With test-case gdb.server/stop-reply-no-thread.exp and host board
    local-remote-host.exp, I run into:
    ...
    Breakpoint 1, ^[[33mmain^[[m () at ^[[32mstop-reply-no-thread.c^[[m:21^M
    21        ^[[01;34mreturn^[[m ^[[35m0^[[m^[[31m;^[[m^M
    (gdb) FAIL: gdb.server/stop-reply-no-thread.exp: to_disable=: t_nonstop=off: \
      continue to main
    ...
    
    The problem is that styling is enabled, and that is causing a regexp mismatch.
    
    With native, styling is disabled in default_gdb_init by doing
    'setenv TERM "dumb"', but that only has effect because the build (where we
    execute runtest, and consequently the setenv) and the host (where we execute
    gdb) are the same.  For this host board however, gdb executes on a remote
    host, and the setenv has no effect.
    
    We could try to make some generic way to set TERM on the host, but for the
    purposes of this test-case it seems sufficient to just add:
    ...
    set GDBFLAGS "${GDBFLAGS} -iex \"set style enabled off\""
    ...
    so let's go with that for now.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/boards/local-remote-host.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/boards/local-remote-host.exp b/gdb/testsuite/boards/local-remote-host.exp
index e57af97a62e..8d69a568f23 100644
--- a/gdb/testsuite/boards/local-remote-host.exp
+++ b/gdb/testsuite/boards/local-remote-host.exp
@@ -30,3 +30,5 @@ proc ${board}_spawn { board cmd } {
     set board_info($board,fileid) $spawn_id
     return $spawn_id
 }
+
+set GDBFLAGS "${GDBFLAGS} -iex \"set style enabled off\""

                 reply	other threads:[~2022-10-14 17:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221014175930.8AABD3858CDA@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).