From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 8AABD3858CDA; Fri, 14 Oct 2022 17:59:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8AABD3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665770370; bh=1mq5N5WupfNdYbM5jTjA0rhu4b40AdYkMi7G9Vb1N0c=; h=From:To:Subject:Date:From; b=iWpQFm3TQCeqfErjrgX94h1oZwRKHsTUz/wP0HZMAE7spl8TGc9uyEKkf3kMcYEQ4 Ph4UeiO1lCxTyhIzGGoE5sf+rsdlCzSoEvuT2LZEbndAqh6s1bECMekw+Pk10wn0ho 0+A2wevFv1SG39PsVXT1ERtfIBzptCaYhb+R2jO0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Disable styling in host board local-remote-host.exp X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 65558ca5df91470521fda6b0bfdfbbdbd37ce4d3 X-Git-Newrev: 17c68d98f74b98704bf5a934dd6a0356a1e08802 Message-Id: <20221014175930.8AABD3858CDA@sourceware.org> Date: Fri, 14 Oct 2022 17:59:30 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D17c68d98f74b= 98704bf5a934dd6a0356a1e08802 commit 17c68d98f74b98704bf5a934dd6a0356a1e08802 Author: Tom de Vries Date: Fri Oct 14 19:59:26 2022 +0200 [gdb/testsuite] Disable styling in host board local-remote-host.exp =20 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=3D: t_nonst= op=3Doff: \ continue to main ... =20 The problem is that styling is enabled, and that is causing a regexp mi= smatch. =20 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 ex= ecute gdb) are the same. For this host board however, gdb executes on a remo= te host, and the setenv has no effect. =20 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. =20 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/boa= rds/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\""