From a99fc443dc9a825e373e9e25576e0bf611167bc2 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 8 Aug 2025 13:51:00 +0200 Subject: [PATCH] [gdb/testsuite] Fix gdb.tui/basic.exp for TERM=ansis With test-case gdb.tui/basic.exp and TERM=ansis, I run into (with some logging added): ... status line: 'exec No process (asm) In: L?? PC: ?? ' FAIL: gdb.tui/basic.exp: status window: reverse ... The status window uses ncurses attribute standout, which can differ between different terminal settings. Fix this by making the matching less strict. Tested on x86_64-linux. --- gdb/testsuite/gdb.tui/basic.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.tui/basic.exp b/gdb/testsuite/gdb.tui/basic.exp index 35c99bd6315..48b90dabbf2 100644 --- a/gdb/testsuite/gdb.tui/basic.exp +++ b/gdb/testsuite/gdb.tui/basic.exp @@ -112,5 +112,9 @@ set re_noattr "\[^<\]" set status_window_line 15 set status [Term::get_line_with_attrs $status_window_line] -gdb_assert { [regexp "^$re_noattr*$" $status] == 1} \ +verbose -log "status line: '$status'" + +# The status line uses standout, which may translate to different attributes +# depending on the terminal settings. Just check for at least one attribute. +gdb_assert { [regexp "^<.*>exec" $status] == 1 } \ "status window: reverse" -- 2.47.3