From: Tom de Vries Date: Fri, 8 Aug 2025 11:51:00 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.tui/basic.exp for TERM=ansis X-Git-Tag: gdb-17-branchpoint~354 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a99fc443dc9a825e373e9e25576e0bf611167bc2;p=thirdparty%2Fbinutils-gdb.git [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. --- 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"