From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684491178; 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=rHq/kZPo2lchp4eG6em8gil3Xi/lYjRlN8FM4Y8Kl60=; b=LVF4jB4PbAjPAUELpuRupasDQ/kGtVl/0veiwzdxV/CrIYleXHRvcKn3SO6CbOhBnwH6iD dDgWp6BWImtmlZZnsZQMhFvJegEtsqJVTK/uB4WY+9gr3EZ2+i7nCrGiH9c9ugu5emTUmq inpUoA4wTRrPdNURTMEB8FubhGzNoZc= 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> From: Bruno Larsen 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-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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