From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cR3JCA3AUGptkAEAWB0awg (envelope-from ) for ; Fri, 10 Jul 2026 05:49:01 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LgUvr86q; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1B2EB1E0A6; Fri, 10 Jul 2026 05:49:01 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D3B1F1E098 for ; Fri, 10 Jul 2026 05:48:59 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 08AB94BA2E39 for ; Fri, 10 Jul 2026 09:48:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08AB94BA2E39 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LgUvr86q Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 3DE744BA2E0A for ; Fri, 10 Jul 2026 09:47:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3DE744BA2E0A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3DE744BA2E0A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783676848; cv=none; b=px0O3P5Xqoe3HD9HwocbqyBBpm4UdVBOEM7wudbl+vlBj5FAiWzKgpysDiSGXq4g0V4qtzwHMbyAMTZh4Uz6vHYtkl+N2Vv8b6aZmlgkElEguE19sgzdUljc7froaQnHhTn3u3H2bd9E2c0qYTbCvEwtSJXuyS8JINM0HqRChFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783676848; c=relaxed/simple; bh=txZ0CKIq7QB8pGY9qIj2l/Vm5dhANL68jXjzi7MpHh0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=nQ6Fnw9KUrE0KAVEZXOQYoSQnu0XOaq0hkrNT4fzu50u7LOjf3OUtJbGZUCQuvL6js1B42unx9jM2VH2QpmxR66Iwwj+7dqKb5MJm93CwF1netyY6S7RMFCKOil+JLM0JFBcHB/RFVXa4m9xJOJyCxnu7t2NJ5eyGyI7T+9/UA4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LgUvr86q DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DE744BA2E0A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783676847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vANU1s8SnLFTmxijqXcafm4/3ZHzn/lil3xrH5Ivb9c=; b=LgUvr86q6BJlXd17SY7qptkuaaF32nYLfYwDMUQ74i2DJLfKfA+fUKUP9t3EFgWvu+8p6q z9gW1dVDi08AyTF36K+Nh3L3U3ceGaFcK4pevQOsc74r/VS2PDofqG2ZbVK4mLwOKeqLCG u1L94oja5v5NnB5JmYLhagkRU/QSBNc= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-533-LCyHP1_bMw2s0Rus7Bu9Jg-1; Fri, 10 Jul 2026 05:47:25 -0400 X-MC-Unique: LCyHP1_bMw2s0Rus7Bu9Jg-1 X-Mimecast-MFC-AGG-ID: LCyHP1_bMw2s0Rus7Bu9Jg_1783676844 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-47f24a50f0cso486423f8f.3 for ; Fri, 10 Jul 2026 02:47:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783676844; x=1784281644; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=vANU1s8SnLFTmxijqXcafm4/3ZHzn/lil3xrH5Ivb9c=; b=G9/0UiKC4X+mLjMROzPZHq04yEFDrRqJXIxmtRHerqjTH9Yo62UNxO1llLLheleUtz eFKXER61wULo/CEEDkYw2r+BsJmmsO3v8/ng5Wngc2bUu32SA81Bf6jtkHNw4cVM+eBX ICrURg+/Wo3pUPSfeMif859lE+pm5qkEaILs3zwJ/JkRViw7VTb1JiQclN51SOOHeRWl NWwJ0tHRjHVNS5bsl/o3UTWOmES3spuBxFyZh+XAYgqCWkJoM5/kZsHFh+B1B32pI+hm FsyRkyxEX+Vw8U7XNKuHItKGxrRvuSF82TSUNlpbVn1e0hBuGUp+mT28KRksX7qVA43H pkDw== X-Gm-Message-State: AOJu0YxmKBL8iq93vYkCOIGXjTdqwT+CfY67vyUg9FPqGETN8ESuojtD s0MMDyCdVz3hU9gum2lWe2YqmZkJ3MhGU3MZJoOfkkNb0281vDGfCluVf4g04BRWJGQQAzPsRPX uN05dHXaArmT6JkGmNCgylgFCBvgTjaeZQ2wnw6jVjcfr0m4FhyoJDgaEnaEbByr2gVfZ+gbQJ4 bXB1kXG2LFGtE3Wb1lFHTmyGh2ZHsLdhq6lau22Iu+hw+iGW8= X-Gm-Gg: AfdE7cnYHdE37rL5NI+jnMTlStkgSl1YsdPqAxg1uzJaHBvvkpuy+dfCAAla0nM1NhZ DPCUhP3yq8DztIA/uDMrmOQviUKyt8/O1rF0Pm09HNwEb5xLzr/mcadmTUGTTiQEohxZqfNiXq+ Wyvx9H/HEi0AQ8r5ngyHW7BVf7rsNlqFL07e7aD7puJMfQozzov/dhEsjTY70OycNiNOMfiISwQ D29tZKfsTRFOYnK/GSA9/7VTO6uPhTpsRbl/vjIw+C1A1EwoPb7jt701D2EkaE3RicELMkMvpAs ZoxaVfNKRZrka1MG/3ewVyM5txlxfQguYQ1HsXTHgj6bazqQtq/LmxkZ/SojyYFbPAbQoaiwh+q EdEhlgOg= X-Received: by 2002:a05:6000:26cd:b0:46f:f12b:e456 with SMTP id ffacd0b85a97d-47df075b35cmr11726679f8f.25.1783676844455; Fri, 10 Jul 2026 02:47:24 -0700 (PDT) X-Received: by 2002:a05:6000:26cd:b0:46f:f12b:e456 with SMTP id ffacd0b85a97d-47df075b35cmr11726634f8f.25.1783676843852; Fri, 10 Jul 2026 02:47:23 -0700 (PDT) Received: from localhost ([31.111.209.233]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa09608d4sm60087542f8f.25.2026.07.10.02.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 02:47:23 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 2/6] gdb/testsuite: fix tuiterm linefeed scrolling new line content Date: Fri, 10 Jul 2026 10:47:14 +0100 Message-Id: <90405d4fc37fd486f58520eb48011d1fefd8c583.1783676703.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: R3Fp2HBfk_zFqDkdOsVoGYWPMtjYqU5Gg4sLpcJIWx8_1783676844 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org I came across a bug in the implementation of line feed in tuiterm. Consider the gdb.tui/tuiterm.exp test 'test_linefeed_scroll', before sending the line feed we have: Screen Dump (size 8 columns x 4 rows, cursor at column 0, row 3): 0 abcdefgh 1 ijklmnop 2 qrstuvwx 3 yz01234 and after sending the line feed we have: Screen Dump (size 8 columns x 4 rows, cursor at column 0, row 3): 0 ijklmnop 1 qrstuvwx 2 yz01234 3 yz01234 Notice that the new line #3 retains its previous contents, all lines have scrolled up, with the old line #0 having been moved off the terminal, but the new line is starting with these cloned contents. I don't believe this is correct. My understanding is that new lines should be created empty -- or really full of space characters. After fixing this issue so that new lines are created empty, the only test failure is the tuiterm.exp unit test mentioned above, this was added in commit: commit e20baea1298d2227db953862d131d9bbf91cf522 Date: Mon May 29 22:11:05 2023 +0200 [gdb/testsuite] Fix linefeed scrolling in tuiterm This commit is fixing an issue with cursor placement after a scroll, there is no mention of the content of the new line, which makes me think that the test is just checking whatever behaviour used to be there. In this commit I think we should fix the new line content, and update the existing unit test to match the new behaviour. --- gdb/testsuite/gdb.tui/tuiterm.exp | 2 +- gdb/testsuite/lib/tuiterm.exp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.tui/tuiterm.exp b/gdb/testsuite/gdb.tui/tuiterm.exp index ccf26195ddc..b6330b0d6a8 100644 --- a/gdb/testsuite/gdb.tui/tuiterm.exp +++ b/gdb/testsuite/gdb.tui/tuiterm.exp @@ -152,7 +152,7 @@ proc test_linefeed_scroll { } { "ijklmnop" "qrstuvwx" "yz01234 " - "yz01234 " + " " } 0 3 Term::dump_screen } diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index e889e3b931b..d23e29d1a6d 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -165,6 +165,7 @@ proc Term::_ctl_0x0a {} { } incr _cur_row -1 + _clear_lines $_cur_row $_rows } } } -- 2.25.4