From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UBmjL8oqdGApDQAAWB0awg (envelope-from ) for ; Mon, 12 Apr 2021 07:11:06 -0400 Received: by simark.ca (Postfix, from userid 112) id BDD891F104; Mon, 12 Apr 2021 07:11:06 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 171E31E789 for ; Mon, 12 Apr 2021 07:11:06 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C137C3896C12; Mon, 12 Apr 2021 11:11:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C137C3896C12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1618225865; bh=omc8dWyDsTBmMC3MvPoABfuPCgSsr15e3tUN+HnYeKU=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vysBM6gAyfBXWdcrW4ZqlaOFbMXFsXd4ktKDhMNFX0vh2z8wyFwRf19VZLCRl3vm6 fHISdNRYZgUnhzAFqoyaDeZtPRiCf+ymPMmOIVLMGvJAdBVI+jfnJ2CA9iV4uTyI4Q pKhgmoOcKtmljOezGevoSxnzTzGemGXY78tD02II= Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by sourceware.org (Postfix) with ESMTPS id 0E0A33896C0B for ; Mon, 12 Apr 2021 11:11:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0E0A33896C0B Received: by mail-qv1-xf2d.google.com with SMTP id i3so459956qvj.7 for ; Mon, 12 Apr 2021 04:11:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=omc8dWyDsTBmMC3MvPoABfuPCgSsr15e3tUN+HnYeKU=; b=M+/+1vCnXxlTTMC6jzt0m9CxQw12WMsRFHiIxdJtaoZ0QoV/rN2fGGOmu5+7KOBfS0 2vOlDK9yWVP7EcFfL+exptOyvDYpDyz32lJQpK0KUAhS5txMmu/0PArYeldEaIj90KAs rA9RnNXftiC85UM9t135wRLVhLbSmt/MLsp/cxtMX9+pAI9MiydNMjQlVON36nejBKiI 3Y1OJZyucKMRO51SUbCyhBUCngAZDdHfVF9QJaZU9M7zvoJg1XEeQrilMG4nOoxWTyCy fb9si8swV9Azy+nr21eCg0zjPNvoGGW5H36Ae6C5iJbuCxo4Po0zxExTkL8+ld31a3GD 6LJw== X-Gm-Message-State: AOAM533vVcB7/WwaQEm2oYb2AzATVy4RtZEsD9mJUy65ZDYmOou0z/eN fNak1+aypAGdgdWbCVtUlnmXu3Vkaa/6sA== X-Google-Smtp-Source: ABdhPJxAJquGCExkDZnST2QOD1wx7MtzrAYsaZs1qBz+o3z09x9GfiwondGl9+u3/avvX8y3Dr7gyg== X-Received: by 2002:a05:6214:12f0:: with SMTP id w16mr4257766qvv.58.1618225863653; Mon, 12 Apr 2021 04:11:03 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:bdd4:355d:8be9:6e9f? ([2804:7f0:4841:2841:bdd4:355d:8be9:6e9f]) by smtp.gmail.com with ESMTPSA id v7sm7275155qtw.51.2021.04.12.04.11.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Apr 2021 04:11:03 -0700 (PDT) Subject: Re: [PATCH] gdb, testsuite, btrace: relax unneeded stepi expected output To: "Metzger, Markus T" References: <20210316092637.935739-1-markus.t.metzger@intel.com> Message-ID: Date: Mon, 12 Apr 2021 08:11:01 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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: Luis Machado via Gdb-patches Reply-To: Luis Machado Cc: "gdb-patches@sourceware.org" Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 4/12/21 8:09 AM, Metzger, Markus T wrote: > Hello Luis, > >>>>> @@ -51,7 +51,7 @@ gdb_target_cmd $gdbserver_protocol >> $gdbserver_gdbport >>>>> # Create a record, check, reconnect >>>>> with_test_prefix "first" { >>>>> gdb_test_no_output "record btrace" "record btrace enable" >>>>> - gdb_test "stepi 19" "($hex in .* from .*|$hex\t$decimal.*)" >>>>> + gdb_test "stepi 19" ".*" >>>>> >>>>> gdb_test "info record" [multi_line \ >>>>> "Active record target: .*" \ >>>>> >>>> >>>> Investigating some racy tests under make check-read1, isn't there a >>>> better matching pattern that we can use here to prevent future >>>> non-determinism? >>> >>> The test now ignores all output since it doesn't really matter where we end up >>> after stepping. This should be the most future-proof pattern. Were you >> looking >>> for a less lax pattern? >> >> Yeah, I was looking for a more meaningful kind of test other than >> expecting anything. > > The meaningful part is just outside of this hunk: > > gdb_test "info record" [multi_line \ > "Active record target: .*" \ > "Recorded 19 instructions in .+ functions \\(. gaps\\) for thread 1 \\(Thread .*\\)." > ] > > We check that we actually stepped exactly those 19 instructions. The test doesn't > care where this brought us. Indeed. Thanks for making it clear.