From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 487873858D1E for ; Tue, 2 May 2023 14:47:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 487873858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6040C1FD6B; Tue, 2 May 2023 14:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683038877; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZKb6YumL9BK3vihBeIsexxDp6XhAqbIYLSgLh2oiaJw=; b=Mr/5gzPBkFK77jf3lnryH6Nc0kCVWSsvTiO7P8teBLEOG2sQdV6oCGdCHI3WnpypaHhtPO wSMJ5wlXzjBdr6iSKUxBZyzHoUxKz7e7tXZdLe1tFYOZC1kkQ73SYgc2blyeiMmAm3xQQk Oo7uKg6Bgxs2HjUDV7ZCeZrECm0vmsI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683038877; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZKb6YumL9BK3vihBeIsexxDp6XhAqbIYLSgLh2oiaJw=; b=dWT+isRbOT1IU3JYuk3eoI4iA0g07ubQA7KYVK1brXVQMO3LHCkidagE1ZpZA6Smtrntap WgrejE+sTTEcddCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4D3DC139C3; Tue, 2 May 2023 14:47:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id D1i+EZ0iUWTECwAAMHmgww (envelope-from ); Tue, 02 May 2023 14:47:57 +0000 Message-ID: Date: Tue, 2 May 2023 16:48:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 4/5] gdb/testsuite: change newline patterns used in gdb_test Content-Language: en-US To: Andrew Burgess , gdb-patches@sourceware.org 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> From: Tom de Vries In-Reply-To: <87ttwv7zq8.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 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. 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. Thanks, - Tom