From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 33995382EA1E; Thu, 27 Oct 2022 09:04:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33995382EA1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666861470; bh=xYCPeIGbAsvGzavKqmhZh8ZzJ/CF27w7FRjazbwy43g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DyBo/Mpq1d2dVumnumfsJZHvYwruCszpaosUuJr7u4rdK5cJDvyHBz+gbr17Ed5OM 9tEflLKWAzEdpTrH1Ov+bKpqQFWrcLgLvoXjTmFwDPbTpsX1eXVSA/5RNWmzKlMAlM czbb6jomj65NCtX6WHnY4MtJDsnKrvgNsDFoeYS0= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/29726] [gdb] FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=delete: connection to GDBserver succeeded Date: Thu, 27 Oct 2022 09:04:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29726 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luis.machado at arm dot com --- Comment #5 from Tom de Vries --- (In reply to Tom de Vries from comment #0) > This doesn't look like a gdb bug, but I have no idea yet what it could be. I think I understand what's going on. We're using remote_spawn instead of remote_exec to do chmod 000, and never = wait for it. So, we know for sure that the chmod 000 has started, but we don't know when= it actually will have effect, which explains the failure I saw: it could have lingered until after the copy that was supposed to restore the permission. So, the non-intrusive way to fix this is to wait for the chmod 000 pid befo= re moving on to the next scenario. OTOH, it's possible that using remote_spawn is a mistake, and remote_exec w= as meant. In the original submission ( https://sourceware.org/pipermail/gdb-patches/2016-February/131420.html ) we had: ... +if {[file exists $binfile]} { + system "chmod 000 $binfile" +} ... but after a review comment "Seems like this won't work with remote-host testing?" it was changed to: ... + } elseif { $action =3D=3D "permission" } { + remote_spawn target "chmod 000 $binfile" + } ... which was committed. Then there was a patch to fix behaviour with remote-gdbserver-on-localhost, which would have gone with remote_exec: ... +proc make_inaccessible { file } { + remote_exec host "chmod 000 $file" + remote_exec target "chmod 000 $file" +} ... Taking all this into account, I think the use of remote_spawn was a mistake. --=20 You are receiving this mail because: You are on the CC list for the bug.=