From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 86922385841E for ; Tue, 7 May 2024 09:32:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 86922385841E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 86922385841E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715074358; cv=none; b=qXP+4uniF5zg02M9HNiZCoQD7GYNNDV9XNESB4wiO2jT37VjISZhhBo5ej3PCEZgFX6J0HHpRn0F/6+9GmxpA9T1YEspMowE9DMzA9h5aUZBblpDtqCLsMTfU6/XlzrrmtAoSfKFvtxyA+eU9qqbPRdVaRCedETipLgmxL+lkNA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715074358; c=relaxed/simple; bh=6x4Bt6CaO9o7ZQGYGfyFqT7XFKcOszAfOanm/U6yz60=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=i/7CnjrA/C3q3lGw99jik6dFl3H9Jwv/OSPSBFIXdY7fs4b6Y8n2BPXtQ3ZqHs3wHBeQbDoULlrGxRE0UmUDp2wfzEariV7KyqnSDEqJvfMJz/DMNa/kZZOgZXJMNDHeGhX/F0aO0EQm8j8BB3DVRSPfr2n7DEMK4a5FY+rvfXg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5515A33C6F; Tue, 7 May 2024 09:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715074355; 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=n4A2pIGm+ak9eCwIAQ7AmX278CCOXvrB6/eA2BFjpqY=; b=hwy3N6DMD4y/FTNQRUwjGc2mAzzI37efv8+AXEsBwr/jU1FOUwxceRyWNbRp3+7v/o8GKb YQfORyQAYTJeYnNA7reR+FxO5vfXbQlW01K5hvlMX87cXNtKOYZ1NknmjGW2VuxjGE+aJM +/mUMSBcB45nFTgvhiAvgwkVBr2HYXI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715074355; 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=n4A2pIGm+ak9eCwIAQ7AmX278CCOXvrB6/eA2BFjpqY=; b=B1PcMF8ilb6uWbpGaU3Zjqw5OjImEMFAnxLwJ4/QueNtgEHngMAN0zIKqtxcwCQJ0Oqozv sGCGbIVF6ounsxAw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715074355; 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=n4A2pIGm+ak9eCwIAQ7AmX278CCOXvrB6/eA2BFjpqY=; b=hwy3N6DMD4y/FTNQRUwjGc2mAzzI37efv8+AXEsBwr/jU1FOUwxceRyWNbRp3+7v/o8GKb YQfORyQAYTJeYnNA7reR+FxO5vfXbQlW01K5hvlMX87cXNtKOYZ1NknmjGW2VuxjGE+aJM +/mUMSBcB45nFTgvhiAvgwkVBr2HYXI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715074355; 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=n4A2pIGm+ak9eCwIAQ7AmX278CCOXvrB6/eA2BFjpqY=; b=B1PcMF8ilb6uWbpGaU3Zjqw5OjImEMFAnxLwJ4/QueNtgEHngMAN0zIKqtxcwCQJ0Oqozv sGCGbIVF6ounsxAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2FC1D13A2D; Tue, 7 May 2024 09:32:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 7as0CjP1OWY+UQAAD6G6ig (envelope-from ); Tue, 07 May 2024 09:32:35 +0000 Message-ID: <3e7d43d4-1102-4a14-8719-2b483d78db74@suse.de> Date: Tue, 7 May 2024 11:33:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/testsuite/lib/rocm: Fix with_rocm_gpu_lock To: Lancelot SIX , gdb-patches@sourceware.org References: <20240507091723.107082-1-lancelot.six@amd.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <20240507091723.107082-1-lancelot.six@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.11 X-Spam-Level: X-Spamd-Result: default: False [-2.11 / 50.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; BAYES_HAM(-0.82)[85.02%]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email] X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: On 5/7/24 11:17, Lancelot SIX wrote: > A recent commit refactored with_rocm_gpu_lock: > > commit fbb0edfe60edf4ca01884151e6d9b1353aaa0a7e > Date: Sat May 4 10:41:09 2024 +0200 > > [gdb/testsuite] Factor out proc with_lock > > Factor out proc with_lock from with_rocm_gpu_lock, and move required procs > lock_file_acquire and lock_file_release to lib/gdb-utils.exp. > > This causes regressions in gdb.rocm/*.exp (as well as in downstream > ROCgdb). The issue can be reproduced in the following minimal test: > > load_lib rocm.exp > set foo hello > with_rocm_gpu_lock { > verbose -logs $foo > } > > The issue is that the body to execute under the lock is executed in the > context of with_rocm_gpu_lock (uplevel 1 used in with_lock) instead of > in the context of the "original" caller. > > This patch adjusted with_rocm_gpu_lock to account for the new extra > frame in the call stack between the caller of with_rocm_gpu_lock and > where the code execution is triggered. > Hi Lancelot, sorry for the breakage, thanks for fixing this. LGTM. Approved-By: Tom de Vries Thanks, - Tom > Change-Id: I79ce2c9615012215867ed5bb60144abe7dce28fe > --- > gdb/testsuite/lib/rocm.exp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp > index 2276bb3640e..b2db0d5c783 100644 > --- a/gdb/testsuite/lib/rocm.exp > +++ b/gdb/testsuite/lib/rocm.exp > @@ -112,7 +112,7 @@ set gpu_lock_filename gpu-parallel.lock > # the GPU lock. > > proc with_rocm_gpu_lock { body } { > - with_lock $::gpu_lock_filename $body > + with_lock $::gpu_lock_filename {uplevel 1 $body} > > # In case BODY returned early due to some testcase failing, and > # left GDB running, debugging the GPU. > > base-commit: cdf5362f562ad605199f28db686f93251979ae5d