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 709383858D33 for ; Fri, 5 May 2023 17:01:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 709383858D33 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=1683306112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xSyG5InjxkXE1rX7wCxw2cIUM2SpX1HBC8OP5tBL0vE=; b=jPK4y7HIRo6AZ2EYyqQfFd73CsFV+kczFZwllvYNNiksY1JX8qLq/jXQu0GbfwuTdrV6ln DRFo+Q//a9y5C20B3Fb9T8u73b/sd5658T/f8uPFT4I5v1Nf4CiLkYeuRH58R2BilKs0jg sBa0AF/rMtjeaGMHIPENQufbxBeljkE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-197-uEs5Y7VbOzKGIvehou8tLQ-1; Fri, 05 May 2023 13:01:50 -0400 X-MC-Unique: uEs5Y7VbOzKGIvehou8tLQ-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f348182ffcso13358765e9.3 for ; Fri, 05 May 2023 10:01:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683306109; x=1685898109; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xSyG5InjxkXE1rX7wCxw2cIUM2SpX1HBC8OP5tBL0vE=; b=JRB/yZx2RJfKQO1s2jCk0N7kJNhJKs+bh8fMbUDEl+1jvcI5RV7UykFMgKyE3bwktu DGqM+3VUNMMJKeQ7ZJfBjEO1eE3CZA78P4I1MOMtr1eABpzKfvIV0NbNRjOmY9jkMpgP qsvKNsIlGSzHAbTdR991icXUMsAHpgFsNle+rW9gmDS8Aq3HrTOmK7PIs+QRZM9fJmSW NbqUtZx7zSioepLzNJAzP9VuTFORC1pJIZDU1ta3pTmixNTSwvtTJJ0Y0DYp++N5JCM7 wngOSVg6pun6pr7utjCg2Gr2leyR+LPJA6201h8tYBEIAK65ZlHmiigJSP+ctsiAh++9 e2gQ== X-Gm-Message-State: AC+VfDzBpd0zWUhIMAZcVCCt+SYXCRVndTK0L+cjrCPFxBUbdb1h1Lnr xLSsLrLLS+bLH8gxzwnWvGDvTLo+mN7mdngsVJG5N0whEm+4JfNbC7zk9SuKbiOUVltJon7qoig 4svnHJ4Pkn9kBnzfDBPyhWjE6xnv45w== X-Received: by 2002:a7b:c30d:0:b0:3f1:745d:821 with SMTP id k13-20020a7bc30d000000b003f1745d0821mr1548264wmj.23.1683306109011; Fri, 05 May 2023 10:01:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6onimmrx5Clt92WsW9IF5FZMn3eT8ftFS2S3TCWf6RHtGOwxuZ+a5urC41HU6p/nTXf+zWLw== X-Received: by 2002:a7b:c30d:0:b0:3f1:745d:821 with SMTP id k13-20020a7bc30d000000b003f1745d0821mr1548252wmj.23.1683306108705; Fri, 05 May 2023 10:01:48 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id w8-20020a1cf608000000b003f18b942338sm8519847wmc.3.2023.05.05.10.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 10:01:47 -0700 (PDT) From: Andrew Burgess To: Tom de Vries , gdb-patches@sourceware.org Subject: Re: [PATCH 4/5] gdb/testsuite: change newline patterns used in gdb_test In-Reply-To: References: <464e64e3a3483c228f0a73c778bcaf79e4595abd.1680293848.git.aburgess@redhat.com> <7552d3ad-c148-f0ea-b219-dd2d9458de0c@suse.de> <871qk09l5j.fsf@redhat.com> <14333280-6e66-0cc5-7e34-46176588ee37@suse.de> <87ttwv7zq8.fsf@redhat.com> Date: Fri, 05 May 2023 18:01:46 +0100 Message-ID: <87354a90g5.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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: Tom de Vries writes: > On 5/2/23 13:13, Andrew Burgess wrote: >> Tom de Vries writes: >> >>> On 5/1/23 16:33, Andrew Burgess wrote: >>>> Tom de Vries writes: >>>> >>>>> On 3/31/23 22:20, Andrew Burgess via Gdb-patches wrote: >>>>>> This commit makes two changes to how we match newline characters in >>>>>> the gdb_test proc. >>>>> >>>>> Hi, >>>>> >>>>> the -wrap used in gdb_test_multiple is defined in terms of gdb_test >>>>> semantics, but it doesn't seem to have been updated to match the new >>>>> behaviour in gdb_test. >>>>> >>>>> I've filed a PR about this regression ( >>>>> https://sourceware.org/bugzilla/show_bug.cgi?id=30403 ). >>>> >>>> Sorry for any problems caused. I'm not working today, but if this has >>>> not been addressed, I'll look at this on Tuesday. >>> >>> AFAIU it's a silent regression, so there are no problems in term of >>> FAILs, it's just that more work is required. >>> >>> FWIW, I think the root cause for introducing this regression silently is >>> that we try to implement the same thing in two different locations, and >>> it's just easy for things to get out of sync. I recently fixed >>> something similar in commit 4fa173cfd79 ("[gdb/testsuite] Fix -wrap in >>> presence of -prompt in gdb_test_multiple"), that's why I noticed it. >> >> So I believe the patch below brings gdb_test_multiple with '-wrap' back >> into line with gdb_test. I also updated a couple of other places that >> used the same (old) gdb_test pattern. >> >> There were nowhere near as many regressions with this change as with >> gdb_test. Let me know what you think. >> > > I've applied the patch and tested it, and saw no regression. I've also > reviewed the patch and LGTM. Thanks Tom, I've gone ahead and pushed this patch -- fixing up the newline issues. > > However, I've now also realized that the ^ bit is missing, which was > also added in this patch series. > > In other words, say we have: > ... > gdb_test "print 1" "^.$decimal = 1" > ... > which passes fine. > > But then we want to annotate the PASS message with the captured > $decimal, and rewrite into: > ... > gdb_test_multiple "print 1" "" { > -re -wrap "^.($decimal) = 1" { > set var_nr $expect_output(1,string) > pass "$gdb_test_name (var_nr: $var_nr)" > } > } > ... > This FAILs because ^ at the start of the pattern is not handled the same > way by -wrap as by gdb_test. I'm working on an updated patch that addresses the '^' feature for gdb_test_multiple. I'm still testing this locally, and it will probably be next week now before I post this -- but I will get this done, watch this space :) Thanks, Andrew