From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by sourceware.org (Postfix) with ESMTP id CC194385C017 for ; Fri, 20 Mar 2020 00:53:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CC194385C017 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-GDGPt-UHOXCTcw81PCFi5g-1; Thu, 19 Mar 2020 20:53:23 -0400 X-MC-Unique: GDGPt-UHOXCTcw81PCFi5g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 67E99100550D for ; Fri, 20 Mar 2020 00:53:22 +0000 (UTC) Received: from f31-4.lan (ovpn-115-20.phx2.redhat.com [10.3.115.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 262009129A; Fri, 20 Mar 2020 00:53:19 +0000 (UTC) Date: Thu, 19 Mar 2020 17:53:19 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [PATCH v2 0/5] Improve ptrace-error detection Message-ID: <20200319175319.3bb071e7@f31-4.lan> In-Reply-To: <20200317154719.2078283-1-sergiodj@redhat.com> References: <20200226200542.746617-1-sergiodj@redhat.com> <20200317154719.2078283-1-sergiodj@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_2, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 00:53:27 -0000 Hi Sergio, I'm still reviewing this patch set, but noticed the following during testing: < PASS: gdb.base/attach-twice.exp: attach --- > XFAIL: gdb.base/attach-twice.exp: attach and: < PASS: gdb.base/attach.exp: do_attach_failure_tests: fail to attach again --- > FAIL: gdb.base/attach.exp: do_attach_failure_tests: fail to attach again For gdb.base/attach-twice.exp, the relevant sections of the log files look like this: (gdb) spawn /mesquite2/sourceware-git/f31-ptrace-error-detection/bld/gdb/testsuite/outputs/gdb.base/attach-twice/attach-twice attach 1113400 Attaching to program: /mesquite2/sourceware-git/f31-ptrace-error-detection/bld/gdb/testsuite/outputs/gdb.base/attach-twice/attach-twice, process 1113400 warning: process 1113400 is already traced by process 1113405 ptrace: Operation not permitted. (gdb) PASS: gdb.base/attach-twice.exp: attach Versus: (gdb) spawn /mesquite2/sourceware-git/f31-ptrace-error-detection/bld/gdb/testsuite/outputs/gdb.base/attach-twice/attach-twice attach 1113182 Attaching to program: /mesquite2/sourceware-git/f31-ptrace-error-detection/bld/gdb/testsuite/outputs/gdb.base/attach-twice/attach-twice, process 1113182 warning: ptrace: Operation not permitted process 1113182 is already traced by process 1113187 There might be restrictions preventing ptrace from working. Please see the appendix "Linux kernel ptrace restrictions" in the GDB documentation for more details. If you are debugging the inferior remotely, the ptrace restriction(s) must be disabled in the target system (e.g., where GDBserver is running). (gdb) XFAIL: gdb.base/attach-twice.exp: attach It seems to me that this should still PASS; I think the regex for that test simply needs to be updated. (You could also add another case.) I've also looked at the logs for gdb.base/attach.exp. The output is similar to that shown above. Again, I think that the regex needs to be updated. If it's the case that the old output might still be produced by some platforms, care must be taken to ensure that both cases (still) pass. Kevin