From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2BsnF8NLZ2Tzlw4AWB0awg (envelope-from ) for ; Fri, 19 May 2023 06:13:23 -0400 Received: by simark.ca (Postfix, from userid 112) id 5B5B51E11E; Fri, 19 May 2023 06:13:23 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ILoSF+XX; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E64EE1E111 for ; Fri, 19 May 2023 06:13:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7ED7E3858C2F for ; Fri, 19 May 2023 10:13:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7ED7E3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684491201; bh=rHq/kZPo2lchp4eG6em8gil3Xi/lYjRlN8FM4Y8Kl60=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ILoSF+XXowisL2U69igD5EB8zSuiqiphdNggTllWJVBQmNtnjB3yqWOlsQjhQxOEp 0BI2yGmY9Rxzy0Trzw+fQdlScxFuy58UcVyRkiRzxLPhFJu9zLZdIAYrh8dzcKZbke 5R9MDnfONbpRA2D47jGqLrqTQ859mEcWXQqsL59s= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 176DE3858D28 for ; Fri, 19 May 2023 10:12:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 176DE3858D28 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-389-ErM1ck9JMd-P6LYqxTcaLQ-1; Fri, 19 May 2023 06:12:57 -0400 X-MC-Unique: ErM1ck9JMd-P6LYqxTcaLQ-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-62381540ab8so4324166d6.1 for ; Fri, 19 May 2023 03:12:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684491177; x=1687083177; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rHq/kZPo2lchp4eG6em8gil3Xi/lYjRlN8FM4Y8Kl60=; b=J0i6lT/WowF2+B0yJbGP9c9ZYxHVGWMopSlFha492tCkT3T9Py5M88l3v+LMjLsNGc RtnxuA65wCCIKFUDkYKWRMRbGKNFMFE3CiHTrNgSw7lI+hstytN49QJixx+w93QAgTYc VlCktcu1txa2BE95Tone/RT9RZfXH9VPmBebLFPzcC81KXsEnrRSajYs3BJiqslhfmB4 6dVE+JDqmDNx7FjBkMUioYzA5n0oP2ziVsDTsZyEER9wxySvBKO1LdCiDv/v8DT8Q7RP 6Lf1b1CaQkYp9fW2dfXQI9X4I0ziTumo60FwTguSqH+am0Wlinh10/FEwmDBJa/oO/k9 KE+w== X-Gm-Message-State: AC+VfDx44kFh8BM0uYM5YGDYMOhE84WmQ33mD6P1UMzXSBLIWGhxvX7R p/nPJiCpzsDhLf3gGdX874AK/7/N4cRS8t00P1I7+oNnHogVF4bQzNLdGIQMPVExTp0NCokqi6O O5dyWk1lLch+ivmpgdEBQ0TwxixrEJQ== X-Received: by 2002:ad4:5b8c:0:b0:5f1:6a6a:f556 with SMTP id 12-20020ad45b8c000000b005f16a6af556mr3107355qvp.16.1684491176860; Fri, 19 May 2023 03:12:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4NwWvfo7ESIoUPotE4s4qj+yjfDZd/A10s+fKcRgxgCGVOCoU/nGXhq+r8ig7M/Hhx8Ad64g== X-Received: by 2002:ad4:5b8c:0:b0:5f1:6a6a:f556 with SMTP id 12-20020ad45b8c000000b005f16a6af556mr3107336qvp.16.1684491176630; Fri, 19 May 2023 03:12:56 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id dy18-20020ad44e92000000b005ef442226bbsm1209851qvb.8.2023.05.19.03.12.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 May 2023 03:12:56 -0700 (PDT) Message-ID: <5691174a-f5df-629d-ae46-4012c7814bff@redhat.com> Date: Fri, 19 May 2023 12:12:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] [gdb/testsuite] Fix gdb.tui/wrap-line.exp To: Tom de Vries , gdb-patches@sourceware.org Cc: Simon Marchi References: <20230518061046.17837-1-tdevries@suse.de> In-Reply-To: <20230518061046.17837-1-tdevries@suse.de> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bruno Larsen via Gdb-patches Reply-To: Bruno Larsen Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 18/05/2023 08:10, Tom de Vries via Gdb-patches wrote: > PR testsuite/30458 reports the following FAIL: > ... > PASS: gdb.tui/wrap-line.exp: width-auto-detected: cli: wrap > ^CQuit > (gdb) WARNING: timeout in accept_gdb_output > Screen Dump (size 50 columns x 24 rows, cursor at column 6, row 3): > 0 Quit > 1 (gdb) 7890123456789012345678901234567890123456789 > 2 W^CQuit > 3 (gdb) > ... > FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap > ... > > The problem is that the regexp doesn't account for the ^C: > ... > gdb_assert { [Term::wait_for "^WQuit"] } "prompt after wrap" > ... > > Fix this by updating the regexp, and likewise in another place in the > test-case where we use ^C. > > Tested on x86_64-linux. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30458 > --- Hi Tom, I can't seem to reproduce that bug, but this change also doesn't add any failures so it seems fine to me. Tested-By: Bruno Larsen -- Cheers, Bruno > gdb/testsuite/gdb.tui/wrap-line.exp | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/gdb/testsuite/gdb.tui/wrap-line.exp b/gdb/testsuite/gdb.tui/wrap-line.exp > index 4587517504c..2bfe342e04d 100644 > --- a/gdb/testsuite/gdb.tui/wrap-line.exp > +++ b/gdb/testsuite/gdb.tui/wrap-line.exp > @@ -25,6 +25,8 @@ set cols 50 > set lines 24 > set dims [list $lines $cols] > > +set re_control_c "(\\^C)?Quit" > + > # Fill line, assuming we start after the gdb prompt. > proc fill_line { width } { > set res "" > @@ -47,7 +49,7 @@ proc fill_line { width } { > proc test_wrap { wrap_width } { > # Generate a prompt and parse it. > send_gdb "\003" > - gdb_assert { [Term::wait_for "(^|$::gdb_prompt )Quit"] } "start line" > + gdb_assert { [Term::wait_for "(^|$::gdb_prompt )$::re_control_c"] } "start line" > > # Fill the line to just before wrapping. > set str [fill_line $wrap_width] > @@ -64,7 +66,7 @@ proc test_wrap { wrap_width } { > > # Generate a prompt and parse it. > send_gdb "\003" > - gdb_assert { [Term::wait_for "^WQuit"] } "prompt after wrap" > + gdb_assert { [Term::wait_for "^W$::re_control_c"] } "prompt after wrap" > } > > # Test wrapping in both CLI and TUI. > > base-commit: 0cc8cc5e6f82b8d3d8e3803c6f7f5e63f0c866ad