This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [pushed] Fix PR tui/21216: TUI line breaks regression


On 03/10/2017 12:59 PM, Jan Kratochvil wrote:
> On Fri, 10 Mar 2017 00:03:59 +0100, Jan Kratochvil wrote:
>> On Wed, 08 Mar 2017 01:19:12 +0100, Pedro Alves wrote:
>>> +# Make sure filtering/pagination is enabled, but make the window high
>>> +# enough that we don't paginate in practice.
>>> +gdb_test_no_output "set pagination on"
>>> +gdb_test_no_output "set height 2000"
>>
>> I get:
>> 	FAIL: gdb.tui/tui-nl-filtered-output.exp: set pagination on (timeout)
>> 	FAIL: gdb.tui/tui-nl-filtered-output.exp: set height 2000 (timeout)
>> But I have no idea why.
> 
> FAIL reproducibility requires: --with-system-readline
> F-25: not reproducible
> 	readline-6.3-8.fc24.x86_64
> 	ncurses-libs-6.0-6.20160709.fc25.x86_64
> F-26: not tested
> Rawhide: reproducible
> 	readline-7.0-5.fc26.x86_64
> 	ncurses-libs-6.0-8.20170212.fc26.x86_64

Curious, I've been poking at this, and had tested with both
F23 and F25, with and without --with-system-readline without
success.  Hadn't tested F24.

>From your log, up until the test does "set height 2000", looks like
curses is issuing "cursor backward" (the 17D and 15D) commands:

 (gdb) set pagination onFAIL: gdb.tui/tui-nl-filtered-output.exp: set pagination on (timeout)
 (gdb) set height 2000FAIL: gdb.tui/tui-nl-filtered-output.exp: set height 2000 (timeout)

I don't get those, and I guess you don't either when testing outside
hammoc.

Looks like the terminal environment under hammock is different
somehow.  Could it be the TERM env variable that influences this? 

By adding 

 gdb_test "show environment" ".*"

just before tui enable, I see that for me, TERM is always
set to vt100, no matter what TERM is set to in the shell
outside dejagnu.

/me pokes some more.

Hmm, the screen height makes a difference.  That could be it.  If I
add a few more commands, then the TUI starts issuing escape sequences
once the command line reaches the bottom.  And if I run make check
in a smaller terminal window, the pristine test starts failing
for me too, due to unexpected escape sequences.

See test patch below, and attached resulting gdb.log.  Note that viewing
the log with "less" on the terminal directly "hides" some of the escape
sequences (they get interpreted directly).

>From 8973caf1689f87632e479fa3d8101a1eab827d24 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Fri, 10 Mar 2017 12:37:27 +0000
Subject: [PATCH] env

---
 gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
index d1f56f2..fd33e70 100644
--- a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
+++ b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
@@ -37,6 +37,8 @@ if {[skip_tui_tests]} {
     return
 }
 
+gdb_test "show environment" ".*"
+
 # Enable the TUI.
 
 set test "tui enable"
@@ -48,8 +50,13 @@ gdb_test_multiple "tui enable" $test {
 
 # Make sure filtering/pagination is enabled, but make the window high
 # enough that we don't paginate in practice.
+gdb_test "show height" ".*"
 gdb_test_no_output "set pagination on"
 gdb_test_no_output "set height 2000"
+gdb_test_no_output "set height 2000"
+gdb_test_no_output "set height 2000"
+gdb_test_no_output "set height 2000"
+gdb_test_no_output "set height 2000"
 
 gdb_test \
     {printf "hello\nworld\n"} \
-- 
2.5.5


Attachment: tui-gdb.log.gz
Description: application/gzip


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]