From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yFk2JDyuyGeqNwYAWB0awg (envelope-from ) for ; Wed, 05 Mar 2025 15:04:12 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=c+rlIy+u; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 83ADC1E105; Wed, 5 Mar 2025 15:04:12 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 491581E05C for ; Wed, 5 Mar 2025 15:04:11 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD5553858CD9 for ; Wed, 5 Mar 2025 20:04:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD5553858CD9 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=c+rlIy+u Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 13C403858D26 for ; Wed, 5 Mar 2025 20:03:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 13C403858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 13C403858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741205018; cv=none; b=D+88bx4v07hmipnzlFyR9h4OcHAEkeRAmBEDrnlzQ9hmJXg7ZPlStjQMP4c/rZhsQ62bHgJF8C3rlj7k5ZaBemynn/lVBIV1oXjTEyGfddPAhwArXc68ZoGvfftlI3c3B34Cr4Ae6wypJUh1T09faJqbyYqHGJANcPA9HewpIcA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741205018; c=relaxed/simple; bh=3b3T7rCezi7jBGuNAtGsRW72fhMkv4Pr/7b4i++YIU0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=tnIN6ZhE4TyUHHO6VyPkGRC5qXvefG6jGPvOD71qA76HLRtKb715QhJrqikGym0k9a4Ldg2j8jTsTUbb7WUYSELapFqkCwcCWmmDmPiKcPtelvb0ki1oD8FQLoNCjkutEdoxN22MZDrHBI0d5cWHql980BLwO4oJsR6YrRbdVMU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13C403858D26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741205017; h=from:from:reply-to:subject:subject: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=mKDUOmTmpyVmhpWwqrH53ModJxfCaxSUleb64aMAzmI=; b=c+rlIy+u2o0nBGOf+Khb4d6BL11vZ8BWu96/aAEl8n/82Z/bQyoVcgUs7wOagybsVx2As0 8GGkBcw2q3+A4TxtjuJXlM0vhjLNJIOHbu16qRclZHthBzwzEmiJtU5XbPCNNk1Y/eryUs ghYnORZztOjjDd7+fXUc0kYc2hH02W0= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-663-AMm4gTGeOeSDd5mjeR6Wvw-1; Wed, 05 Mar 2025 15:03:36 -0500 X-MC-Unique: AMm4gTGeOeSDd5mjeR6Wvw-1 X-Mimecast-MFC-AGG-ID: AMm4gTGeOeSDd5mjeR6Wvw_1741205015 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-2ff52e1c56fso2180572a91.2 for ; Wed, 05 Mar 2025 12:03:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741205015; x=1741809815; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mKDUOmTmpyVmhpWwqrH53ModJxfCaxSUleb64aMAzmI=; b=Uqp+IQa/Pb10skcEGnwQnxsp50d6985tsJhMIzol9BxUzTGJK813jnVSJ4TwglYW2B t36PQYxv6duR5cb+s+IdIupIeVAp17x2673TWXQVluLphxBHOUH7gi5bmapIv6mVEkyl Lr+kXtHxblVoCPhHvtGch3mmw4kwyF0wvZB1iIElJT11lv+7ET4iSXkLvPZHuTvrnoPn OM0LYcff3yv4pRYndRtEd/HK0QgN56ba+QZpKuTxgOaZZPBQmod3eDXF/qJWLs8as8bf xQBM7xpx2DtUR8AaMGAIc6P/AmxAWf6AjIXsh9EI+ptofdqGiAimEZxoG6Wh13s18Jv7 KWig== X-Gm-Message-State: AOJu0Yz8eU1558mNggjZ2BQdJycVJa9PD3L8dlBpBFS7iqhpVYQLeGt/ c3C1j+FMTOusXR2xJr8HlRiRyHG+SLeQWr9uSjdaS2Yqk29BGAqtS8jWh1ZkUnf/iLOEe8PmTk4 VzFLpmastJAi272n2Ha+pxWbSJwXI45ZCcR9yRasqG/6292qnQKDMuzC80bw= X-Gm-Gg: ASbGnctZm0KDPGTOZDU631D4s81/AcUidDsLu4J8cWtJkwKZgrENouGj4KMH9z2NN5w rct6YY8nA5umbNavwwpuCYhaUtoITZa8aGJJywSwYpZj5dFvSAr+om5drr6RhIfdiVyG30bpvMf 3xY4cCc8glR+2HvPYJRU3DIGN0We5rwljxJ3mos3SHT9NLJj03EHT8o/jimgj+wyhbQ0lL2oQ5B Hx1R1NN67Vnti3s6mWu2ZUKf6BUdNwUkd2tDVpnm71FiOQ9Iak6hUSQ9LY4tL7DfCrDja3W1YWQ 2mQ5zdo2idhuAFHmjb2oKP0bh9s= X-Received: by 2002:a05:6a00:3d14:b0:736:6202:3530 with SMTP id d2e1a72fcca58-73682caa185mr6687430b3a.22.1741205015191; Wed, 05 Mar 2025 12:03:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEy5eF5ZlLolmcMchHPr7ZVstzPTig8lk7tp/c3lyb8nkj/P0c3Ut2koTKob/8qjhGsIIAsZA== X-Received: by 2002:a05:6a00:3d14:b0:736:6202:3530 with SMTP id d2e1a72fcca58-73682caa185mr6687396b3a.22.1741205014693; Wed, 05 Mar 2025 12:03:34 -0800 (PST) Received: from ?IPV6:2804:14d:8084:9a69::1001? ([2804:14d:8084:9a69::1001]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73658990fddsm6422435b3a.101.2025.03.05.12.03.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Mar 2025 12:03:34 -0800 (PST) Message-ID: Date: Wed, 5 Mar 2025 17:03:31 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] gdb/testsuite: add test for memory requirements of gcore To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20250225134544.2129276-1-guinevere@redhat.com> <20250226175058.3060581-2-guinevere@redhat.com> <87ikoo1wwy.fsf@tromey.com> From: Guinevere Larsen In-Reply-To: <87ikoo1wwy.fsf@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: t2tCLZajWSI2acUUii_GYq8lN67fOr80uN9dbUah6sY_1741205015 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 3/4/25 3:19 PM, Tom Tromey wrote: >>>>>> "Guinevere" == Guinevere Larsen writes: > Guinevere> The test runs twice, once with the inferior allocating 4Mb of memory, > Guinevere> and the other allocating 64Mb. My plan was to find the rate at which > Guinevere> things increase based on inferior size, and have that tested to ensure > Guinevere> we're not growing that requirement accidentally, but my testing > Guinevere> actually showed memory requirements going down as the inferior increases, > Guinevere> so instead I just hardcoded that we need less than 2Mb for the command, > Guinevere> and it can be tweaked later if necessary. > > This seems fine to me. I didn't understand why it needed to attach, it > seems like just running it would be the same? But also it doesn't > really matter, considering you've done the work. > > Approved-By: Tom Tromey > > thanks, > Tom > I noticed today as I returned from a holiday that I misunderstood the issue on v2, so I made this small change to the test, to stop it from falling. I'll push the test on friday if there are no comments since I think it is a pretty trivial change. --- diff --git a/gdb/testsuite/gdb.base/gcore-memory-usage.exp b/gdb/testsuite/gdb.base/gcore-memory-usage.exp index 1e31578d4a9..db7f270a5e8 100644 --- a/gdb/testsuite/gdb.base/gcore-memory-usage.exp +++ b/gdb/testsuite/gdb.base/gcore-memory-usage.exp @@ -59,7 +59,7 @@ proc run_test {megs} {         gdb_test "attach $inferior_pid" "Attaching to.*"         set line [gdb_get_line_number "TAG: BREAK HERE" $::testfile.c] -       gdb_breakpoint "$line" "break at to known line" +       gdb_breakpoint "${::srcfile}:$line" "break at to known line"         gdb_continue_to_breakpoint "continue to known line"         # Get the important info. -- Cheers, Guinevere Larsen She/Her/Hers