From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id D1B4E3889809 for ; Mon, 12 Jul 2021 15:08:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D1B4E3889809 Authentication-Results: sourceware.org; dmarc=none (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-out1.suse.de (Postfix) with ESMTPS id 1888C21F8B; Mon, 12 Jul 2021 15:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1626102517; h=from:from:reply-to: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=fXEsnMb/c4XjIO4PI1v52sMJi1BM3NPcYiEc7KMeZ1M=; b=xvdAF0EwUM6+RyrVBW2a0MA/gBk/Y1MUMwCkIk4o3zUK8KSrfQMbs+nnAICpYOtZOWzHIx xu2t2/yvrPgd6nhb3WodB6vSBuae+o17IwqJa+juM0eJX1vmc1dxcW3ykPiXeXQ2puZNv1 9qBa0GmVAmjKOPLLuBUxPIY7/y0bUKc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1626102517; h=from:from:reply-to: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=fXEsnMb/c4XjIO4PI1v52sMJi1BM3NPcYiEc7KMeZ1M=; b=/Kei/k1X4C9XZ0/cUjHg2JaPl+AlgrrsY7bb5ZcLZnBnsActPVVWMs9puwFTqIAUOZwfnR mKAqx3Cuprrt9ZBA== 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 030C713BAE; Mon, 12 Jul 2021 15:08:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IPUiO/Ra7GBsCAAAMHmgww (envelope-from ); Mon, 12 Jul 2021 15:08:36 +0000 Subject: Re: [PATCH][gdb/testsuite] Fix gdb.btrace/tsx.exp on system with tsx disabled in microcode To: "Metzger, Markus T" Cc: "gdb-patches@sourceware.org" References: <20210712112738.GA2111@delia> <0e162414-67d4-a05c-6603-c4521b480e1c@suse.de> From: Tom de Vries Message-ID: <08afefa5-59ba-e5a6-cffb-4d0d43b2d50f@suse.de> Date: Mon, 12 Jul 2021 17:08:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 12 Jul 2021 15:08:39 -0000 On 7/12/21 4:35 PM, Metzger, Markus T wrote: > Hello Tom, > >> diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp >> index ccde1ea807e..66f6305e50a 100644 >> --- a/gdb/testsuite/gdb.btrace/tsx.exp >> +++ b/gdb/testsuite/gdb.btrace/tsx.exp >> @@ -59,6 +59,11 @@ set abort_2 [multi_line \ >> "\[0-9\]*\t 0x\[0-9a-f\]+ :\tmov\[^\\\r\\\n\]*" \ >> "\[0-9\]*\t 0x\[0-9a-f\]+ :\tret\[^\\\r\\\n\]*" \ >> ] >> +set abort_3 \ >> + [multi_line \ >> + "$decimal\t $hex :\t\[^\\\r\\\n\]*" \ >> + "$decimal\t $hex :\tmov\[^\\\r\\\n\]*" \ >> + "$decimal\t $hex :\tret\[^\\\r\\\n\]*"] >> >> set test "speculation indication" >> gdb_test_multiple "record instruction-history" $test { >> @@ -68,6 +73,9 @@ gdb_test_multiple "record instruction-history" $test { >> -re "$abort_2.*$gdb_prompt $" { >> pass $test >> } >> + -re -wrap "$abort_3.*" { >> + pass $gdb_test_name >> + } >> -re "$begin_to_end.*$gdb_prompt $" { >> pass $test >> } > > We allow (and require) a single instruction in main. > That works if we stopped > directly at the call. I don't think we can guarantee that. > Well, we require at least one instruction. There can be more that one. So that should work if we stopped directly at the call, or before. The current form is only wrong if there is no instruction from main in the trace, which I don't expect given that we start recording in main. Is my understanding wrong here? > In the other patterns, I put .* in front to ignore any compiler-generated > code prior to the actual test. A .* at the start of a -re clause is redundant, so it's best to leave that out, to avoid confusion. Are you satisfied with this explanation, or do still require changes? Thanks, - Tom