From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id o+vmCWO39GnsKgkAWB0awg (envelope-from ) for ; Fri, 01 May 2026 10:23:31 -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=bQ0nBSsu; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1AF0C1E0BA; Fri, 01 May 2026 10:23:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.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,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED 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 6A94E1E067 for ; Fri, 01 May 2026 10:23:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id E881541F5687 for ; Fri, 1 May 2026 14:23:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E881541F5687 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=bQ0nBSsu 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 7FD3C4374206 for ; Fri, 1 May 2026 14:23:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7FD3C4374206 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 7FD3C4374206 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777645384; cv=none; b=EO2PBsu+cPD+cryb16G0nXQ51FPIQtC0bjlOysUZFilUJy3OLD/PE/TDsWDtPyAsxfMHdZIsoxo6NucB3w0XIuYE1jvmNJgtdbJS23kdfVEYymGoo0FUZRqHHS6E4+jcBeRgMSE2dFrcggON8lpfnMFuBGOgs8O1KDd2VxDAy/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777645384; c=relaxed/simple; bh=1mkF/6j9RMBk4bAeBFnA/kuRpPe8B06Y2s0MHs/ZyAM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=masVQwjED833rfyb9WYkqZLFDPkva/OgYJ+UD7spiFQQTiaW9nNRfDS8OO8sL0CFuuygTGvqeVv2mRF/7SM6e8+RfWwfckGY9HCbJbP+Ze0uOCDrAsFz+PafiHM1bmMrvT1dH7CtqdNyr5w7Btu9ZI9YFKnWD2BqxhJlEQPESvo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FD3C4374206 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777645384; 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=C7jSIsBiZYgnTqdJQcsHA0oegA+6pcDwWLO4Pt/Nvx4=; b=bQ0nBSsuAZ0m/lJDKbwI5JDTZbu2QErmq1AjPyqqNLYXa1+fOBnWaO9hK3FV5+3mjHUN6g dldRVW9naKSeB1hlUDHysOipacd8IJNk4SN0aLuXYO55oe+Uw9xOC6YnfJOE3rZkJeSFIV 3ydq4t4S5qlVw9UHE5jBrLGax+SfBzc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-237-UWL-x74FNFSkuNIdrK6bVg-1; Fri, 01 May 2026 10:23:02 -0400 X-MC-Unique: UWL-x74FNFSkuNIdrK6bVg-1 X-Mimecast-MFC-AGG-ID: UWL-x74FNFSkuNIdrK6bVg_1777645381 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-48906aa28cbso23876625e9.0 for ; Fri, 01 May 2026 07:23:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777645381; x=1778250181; 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; bh=C7jSIsBiZYgnTqdJQcsHA0oegA+6pcDwWLO4Pt/Nvx4=; b=VTVMe0xgH5yDcRgEQexreI7nnzwqw7ULtYlpcm6493NNJJRA47pwveZ+fhnSCWOvsq DKUJP2hK9febLC/OnKthN2z9VCHqh2P/YhdamFkezBFZmiCHQFpULms8BnThWrRl+MyX QV924I+khFglH0SyiGTsn4Sba/skhKma+WCNcp6Ai823zuxFcrFBbiJ3cnhdcZTMhUU4 e4luNxVjwrxjAH9PxmDTZbnq6hAwsFAoNF/VScomwPoGUIj7pMWtGicaRiZCo6fhFKUW gJvSA5F7xjvRSwpKWlMueY4c2BrhGvRCzrD+bzgNMnrNgCm6kFKR4kpf3WRRkqCuzNUe VgsQ== X-Gm-Message-State: AOJu0YyNZr2de9I5ETSWVTi35JUHOo7Gz+aVwzucPfbYTtA+bLwMAvqs 7LBQlNPvvO/u8tvEEBEFjVbEkTwzSCJl1434tPf7LkDxQCYRF/yAeOpruzer9RlRae95i4MjHAP 6pQ0DWmymRZzVGzZPkHl6D2XFoQYLYLlrCyvptMWW4vHNw03BTLN4piQROrl8NpRv5xFqd8n7pz 2i+m7cZkEsfL87+y1Xo24IxoxaRh9cNRhSt+OLb/TiwsNwD+Y= X-Gm-Gg: AeBDiesjePrI+u9/eOhhZ/YOQz1A6rQPsOCXRIWHbaPVozW4sDzu9VmNIR4ttAcpvl8 fdT65qCYkavJ4CYpVGOCqZWQNsBI5FeP/KO9xmaC0Si3BBiZW97HmOe76AxDVeDstoP+umvNiJe eduNG2efxFOcZ1uZI+h0IzlVO2rpfpJJtVYUxCx7IhQWhAOov3/+mB8waTXNnmC+JuAltDTaQLt 3UEJGqnuMvw6kZLok+uEe+pGUskeJdgKaKQN71fMrPNq/fpOITsi3Z5vYsONW+AoFIcKJ/zrsOK EflugdHoqWx9vVqD1KRK3daixuK5V+FrG/SDxPU4lE7Eayf8PIjTQMSDALiraIioC91tfevR94W dxc2tpl2F5AZ8mzeTZIzD10GR8DY= X-Received: by 2002:a05:600c:5286:b0:486:faa8:9e4 with SMTP id 5b1f17b1804b1-48a86085131mr114065755e9.12.1777645381326; Fri, 01 May 2026 07:23:01 -0700 (PDT) X-Received: by 2002:a05:600c:5286:b0:486:faa8:9e4 with SMTP id 5b1f17b1804b1-48a86085131mr114065185e9.12.1777645380797; Fri, 01 May 2026 07:23:00 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a822bf3ffsm145505735e9.7.2026.05.01.07.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2026 07:22:59 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 2/6] gdb/testsuite: fix tuiterm linefeed scrolling new line content Date: Fri, 1 May 2026 15:22:52 +0100 Message-Id: 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: xaXBGtTbSw9O6YNhZhTips3OUMo0yiBalVhGk3crwM0_1777645381 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 a03c32b3f60..55b8e595604 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