From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id D49D33858D26 for ; Wed, 22 May 2024 16:43:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D49D33858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D49D33858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716396214; cv=none; b=dUwaEB40g2yRotZFX04aFKO61NBMglePjpoi+Gjf8XqyY8nTQVPrNHv+K+Qu4Nn4NWLFg/vs6eORrPIHiveuSuuC/ye05rR4yvdxZdjK5/JWL6WMnk9Hv4pdkxmCxfDTUH6sq6l0VyRxyYYPRY1Bp/ph2XjDV9VPSyq10mQTkIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716396214; c=relaxed/simple; bh=xmVbblnkY6IY54qpFYbKxv98xzXjSIpbm8i5Kg5g7pk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ssjQ8wkL//sqzapecGXdIc4e9kpd3cDgT8XJnr+GTQdpGSWJg+TO9w4y4DWQMVtZOqFr/QLJm5c5+Bo5F1GGjfaAfeWWLwNcctRpRAhj0QVA1QHlCJ0OFB8Ov6uWxl+oFPPT0tipyJrRpI6AXGzPs2HJ+xoQ1b867KVg03N3v7U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1eb0e08bfd2so117543055ad.1 for ; Wed, 22 May 2024 09:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716396211; x=1717001011; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=949KSWroSKiYjORZWwLJTxjKaqYH1ppRgQ3HJMYOjg8=; b=BgSH/eyck1+pZ3HwIt4uXkCwA1IGzAvBdTE0fegGIBsGYhcYEbrLqzBtBNmYUixAyA QA0144AGhYMMXvaGgd9/y39k1CJy95KAR9ATtJLFHy4YVgSJBcHXEM3QYbdkeaKS843Z 6NNeZKoDsxL8cFB/IyWOuNbOHVVXF/axovfgf/7NLSFmoXBineUDg12HoR/BWjwMvXaP UAnzXuGnb3nQIAi77sY804KGO5i/0wbcNEziSlFEbHpIrHPyGOMjTv5lDHj7q4gsS9Ug AdPj/9DLzu+2MBe0FWAXbwunkpcxaJqNFuqMdGWGxfRjTiq3pzNLWi4YyL+Dw5vg4dKd T0Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716396211; x=1717001011; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=949KSWroSKiYjORZWwLJTxjKaqYH1ppRgQ3HJMYOjg8=; b=QvV3Dn5ozkZ6SvP/hiB6ztpP9UDdGx7mW3osWJ6482Q5k0U4HqBJ+qV/+aVmJFXw7c bsK15bXa3++WO7o3tVsRP1WZIcAbWSeWLBfHrSY1OdC5fLC9moKM/zVvlpKC2lsdtHqQ MOeqXhUtMWn1g2o5o50rfNFRopIQLuZd2WpJpAbzLOY7PRT8Pvnk73X6bFfe6fHHvqGP 9G/b4nfqp9E1a5GfZA0hrQpiSA6aSG6IjMkk3KKBC/t/kZs4iSB0BcUYtWRWF+ZFcZJz 7paMX+sXrXKzr8F/qdUCLp2mBap1ixXgCh+st2JD/fQZsH63H1SICAhN9btkUqiRvK6N Nopg== X-Forwarded-Encrypted: i=1; AJvYcCUIlmy607qzNvz7A5FhDWiW9GW7k4RMEckbEN+FsOkySRQEnQeUdsasXuL6VeNVu6CJsqJRXmDMD2ZCihwVEBUweQUIVDfz2ydByg== X-Gm-Message-State: AOJu0Yxhqz2Evb0yTyKz3oL77wUr8dbCBaBWQsV+NpF186kGCbukyNga Ny6OYhGsLLXqiGsNUdxuhza7adxWxgHgwAQCEDJQ8yBiqY7zQMc1eRyk6sJLKSQ= X-Google-Smtp-Source: AGHT+IFYQUcRFAzkr1SLn+wxfTyHN4I9yJHTZvKfEJAMhS7rgFPEtFw65HpDMM6/VC703sU+48AEmQ== X-Received: by 2002:a17:902:ec89:b0:1f3:2fa0:3b09 with SMTP id d9443c01a7336-1f32fa03bc5mr12823165ad.66.1716396210737; Wed, 22 May 2024 09:43:30 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:f149:d562:aa25:4733]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bf31da2sm247216335ad.165.2024.05.22.09.43.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 09:43:30 -0700 (PDT) From: Thiago Jung Bauermann To: Tom de Vries Cc: Pedro Alves , gdb-patches@sourceware.org, Christophe Lyon Subject: Re: [PATCH v2 3/5] gdb/testsuite: Add gdb.arch/aarch64-mops-watchpoint.exp In-Reply-To: <2582ba11-c8b7-428c-a36f-b7504121608c@suse.de> (Tom de Vries's message of "Wed, 22 May 2024 11:22:43 +0200") References: <20240507022249.554831-1-thiago.bauermann@linaro.org> <20240507022249.554831-4-thiago.bauermann@linaro.org> <42b9869a-2012-4657-bae4-e8e2bb3a89a4@palves.net> <878r02vpw1.fsf@linaro.org> <2582ba11-c8b7-428c-a36f-b7504121608c@suse.de> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Wed, 22 May 2024 13:43:25 -0300 Message-ID: <87cypdu79u.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: Hello Tom, Tom de Vries writes: > On 5/21/24 23:03, Thiago Jung Bauermann wrote: >> Hello Pedro, >> Thank you for your review! >> Pedro Alves writes: >> >>>> Note this causes >>>> +# a restart of GDB. >>> >>> Might want to apply a similar logic to can_spawn_for_attach, wrt gdb_exit. >>> See the tail end of that function. Maybe we can factor that out and >>> reuse it. >> >> I looked into it, but I wasn't able to understand what is the problem >> that gdb_exit causes. Does it mean that any require predicate that >> restarts GDB needs to use that two-tier caching scheme? >> > > Let me try to explain the idea. Consider two demonstrator test-cases: Thank you for the explanation and clear example. I understand the problem now. > This two-tier scheme is convenient for can_spawn_for_attach, because it's a pre-existing > proc that didn't use gdb_exit and consequently was used in random places in test-cases, > and also multiple times in a single test-case. > > For a proc like allow_aarch64_mops_tests, which is only used at the very start of a > test-case, once, IMO it's not necessary, and not worth the effort of splitting up the > proc. Yes, I agree that this issue doesn't affect the require predicate proc. > However, if we factor this approach out into a special variant, say > gdb_caching_proc_with_gdb_exit or some such, then it could be done relatively easily. If there are other caching procs that exit or restart GDB that are used in the middle of testcases, then that is indeed a good idea. -- Thiago