From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 83D403858C53 for ; Tue, 1 Aug 2023 14:05:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83D403858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 49871CD763; Tue, 1 Aug 2023 16:05:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IGU-ERsK9E50; Tue, 1 Aug 2023 16:05:40 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p50855fc8.dip0.t-ipconnect.de [80.133.95.200]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id A21DCCDD05; Tue, 1 Aug 2023 16:05:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1690898740; bh=nwgo6t3vB2euSZA52qGIGhBgotl4Q8lnCmP39I6Cpng=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=dvHXKXn0ODUz388+cNXZtuYU+E0qZp3I5s/3uInlnMPIbxEU3mY0TaNQCQpJE/kE4 3T5L1ruzsGu//GDTyeuZihwHIdiWUUpSIfbS8oMIjVwzcpUPGl8XMD2e0oS9YjbRdL JRrkgROewJ9u4kxC4R687N+NEzxDv9G4BUEXYAbDowSJeL0zNsYvTOm/vPFIfl5Lny U1L8pFUZsJL/uaJqyPMDNH1AnC9t9yfD1zx8AKSuvpPslm7ly3uX6DOGp/oIbxvaPv EEIOfDrAmBJcxjGUdrgCS3PM8M5r/iQk66PX0sgvpBQSJrw/L2sUhGufExGWSiBzFp CCD+QxmTm+mSw== From: Rainer Orth To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Guard against killing unrelated processes in amd64-disp-step.exp References: <875y6li9as.fsf@redhat.com> Date: Tue, 01 Aug 2023 16:05:40 +0200 In-Reply-To: (Rainer Orth's message of "Wed, 19 Jul 2023 14:37:04 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3791.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi Andrew, >>> diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step.exp >>> b/gdb/testsuite/gdb.arch/amd64-disp-step.exp >>> --- a/gdb/testsuite/gdb.arch/amd64-disp-step.exp >>> +++ b/gdb/testsuite/gdb.arch/amd64-disp-step.exp >>> @@ -222,7 +222,10 @@ proc rip_test { reg test_start_label tes >>> # If we use 'signal' to send the signal GDB doesn't actually do >>> # the displaced step, but instead just delivers the signal. >>> set inferior_pid [get_inferior_pid] >>> - remote_exec target "kill -ALRM $inferior_pid" >>> + # Ensure that $inferior_pid refers to a single process. >>> + if {$inferior_pid > 0} { >>> + remote_exec target "kill -ALRM $inferior_pid" >>> + } >> >> Does this not hide the fact that the test is no longer doing what it >> expected? > > it does. However, the results for this particular test were so bad > already that I didn't think about one or more FAILs here. > >> I'm fine with the 'if {$inferior_pid > 0}' being added to ensure we >> don't signal some random process(es), but I think we should probably add >> something like: >> >> gdb_assert {[expr $inferior_pid > 0]} \ >> "check for a sane inferior pid" >> if {$inferior_pid > 0} { >> remote_exec target "kill -ALRM $inferior_pid" >> } >> >> This way you will still see a FAIL. > > True, but you will also see quite a bunch of PASSes in the working case > that tell you nothing. Seems like unnecessary noise to me. Isn't there > another way to convey the failure info without that noise? how should we proceed with this patch? It would be a pity to release GDB 14 with make check killing the whole session on Solaris... Thanks. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University