From patchwork Fri Mar 10 13:33:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 19508 Received: (qmail 85852 invoked by alias); 10 Mar 2017 13:33:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 84036 invoked by uid 89); 10 Mar 2017 13:33:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=BAYES_05, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=influences, cursor, UD:20170212.fc26.x86_64, sk:ncurses X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Mar 2017 13:33:41 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF274C0528CD for ; Fri, 10 Mar 2017 13:33:41 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2ADXerb005560; Fri, 10 Mar 2017 08:33:40 -0500 Subject: Re: [pushed] Fix PR tui/21216: TUI line breaks regression To: Jan Kratochvil References: <1488932352-10885-3-git-send-email-palves@redhat.com> <20170309230359.GA503@host1.jankratochvil.net> <20170310125946.GA508@host1.jankratochvil.net> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Fri, 10 Mar 2017 13:33:39 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170310125946.GA508@host1.jankratochvil.net> 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 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"} \