From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NYczNPkFQ2iWVwMAWB0awg (envelope-from ) for ; Fri, 06 Jun 2025 11:15:05 -0400 Received: by simark.ca (Postfix, from userid 112) id B4EF41E11C; Fri, 6 Jun 2025 11:15:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 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 3B8481E0C2 for ; Fri, 6 Jun 2025 11:15:04 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9CFCF385771D for ; Fri, 6 Jun 2025 15:15:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CFCF385771D Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by sourceware.org (Postfix) with ESMTPS id E2AF63858C50 for ; Fri, 6 Jun 2025 15:14:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E2AF63858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E2AF63858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749222867; cv=none; b=YvPqt/52DSpnxuOHtE4YK9Cp32L9ajGynthGAEKJkZ1FQQldxXalyv8naHwu94lwd0oMDU40r+a3A2J1iAYQlQwEurj2GzSHiTgHo1j5g7GM3Uj2gpl3FIcZLqeWB1jk6mNcP+VkuzxM+ZA+vLw8FJfCzPbnsKEApZVSXy33PZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749222867; c=relaxed/simple; bh=X/oxn2090m5EcxkvZ5SIXp1tR9M+ZS1AD0x+XbHRijk=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=UVns6MO8sJ8Fr2ZOxQs33XEubuqcctN9sNJcL7ztIyPqs7z99brueyvt7zg3LRfeJCk4uuuTI+PJfIToRwZFwdu6g40v+OpbXrCoTzH730r5KstAk8misNot5qHwxvc+AgENIaFQxTFQtFg8bK7aVonxVpkulPZ35NQxUp7EQnw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2AF63858C50 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4508287895dso21477505e9.1 for ; Fri, 06 Jun 2025 08:14:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749222866; x=1749827666; h=content-transfer-encoding:in-reply-to:content-language:from :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CANWiBGRjQ1xkihur81OuSjMCv8OgnTs+BVphJ22BBg=; b=chw7Av0JLGPK4xK3f74NWjKthNZP7KH1dr8tOIENvkaxRgSArngn8y8MtLiqCgLlTq x6cov9/lZSqjI2EB1Icaj9YqlU8vcLmEabEzLaIVE/iwbj3X4Zq3nn4/ninF05OJDUuC m1LO+McWNo0ZNs5F7H94rCKXjiHNaNXbvI6OKYqXPrsMzaLQmDboczVEuIp2zpIryfXq hh3spJXCCLJlbW5EOdsTf0iOAa7GeasV77LGz3vTske8ajC5y/xhT9MWdmDoiSD5ux5H PX+4cuZuOlA/f7ljK+Pm33gXWLNCnBoD6eqFgutXMMPK8jPp/BTG2FsbG5japQ5TKSFc QOWg== X-Forwarded-Encrypted: i=1; AJvYcCXhyX1L9ulY97AEHhYy3NtamBezoDeOyQUi3UNQeX/auoT687Ak7scpffXVii5jR9GhN3u2qVp4cNskCA==@sourceware.org X-Gm-Message-State: AOJu0YwDvfnwBECEC8EEsYZyqJTsqGRKibpidznwSNMgzCRcBeMaG1z/ z7qpq+mwZLQB+sRPcTUhcurHSF4xhCxv/IYXX0Kd30m1UNgSLaE3y6Q4vy7mbQ20 X-Gm-Gg: ASbGncurzRHO+ZEsmxhBnXc59SSS/CbURpBBkLjhWyisGUhYxT8a0ul6C+ae0Eu0GB0 wrjIJupH4ZWCchIxjlk8+a+PcTa0ovdN9rnxSy53FbjtXHb+tCr5xkodJA6OjT6aHXk4kuBkCTs pxQYEHnUfupHP2DYNRhVbNUHptbEF7cBDRD88EpyCjcrZk4Xnxd9GJik80yZg8e2hkh+d4vOUMT BWamWKSWV0SZIdFDYX849lHnsU9yYv0+p6gVp21tsDzlGLEyD4f0Pv33WNrOMyqkNLSedDYibrY 4K1e9m4xwLBKw76/pUJ24gZrCCV+kPEcy3f1SPTox46tEFsi6NtpL+fbuRAOJZ3tFTXIRBCR4UL aE2tPRC0iuY7lSbWC X-Google-Smtp-Source: AGHT+IHfFU6zbNRI2hvVX7585aQrd1h2hURivTF/5uDvn9zRy+B2uXEZnYV/g2hh3s2TxRBXzXjKgQ== X-Received: by 2002:a05:600d:16:b0:43d:5264:3cf0 with SMTP id 5b1f17b1804b1-451f88ad7c9mr62819055e9.11.1749222865358; Fri, 06 Jun 2025 08:14:25 -0700 (PDT) Received: from ?IPV6:2001:8a0:facf:2b00:77f6:647:8d2f:f905? ([2001:8a0:facf:2b00:77f6:647:8d2f:f905]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45213709670sm27261075e9.25.2025.06.06.08.14.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jun 2025 08:14:24 -0700 (PDT) Message-ID: Date: Fri, 6 Jun 2025 16:14:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/tdep] Don't call WaitForSingleObject with INFINITE arg To: Tom de Vries , gdb-patches@sourceware.org References: <20250605150330.26246-1-tdevries@suse.de> <4311a30a-51cc-4054-8219-48f895bd962f@suse.de> From: Pedro Alves Content-Language: en-US In-Reply-To: <4311a30a-51cc-4054-8219-48f895bd962f@suse.de> Content-Type: text/plain; charset=UTF-8 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 2025-06-06 08:12, Tom de Vries wrote: > FWIW, I've ran the testsuite again, and got stuck this time at gdb.base/catch-fork-kill.exp.  In this case, the problem didn't seem to be gdb, but lingering test execs.  After killing those manually using "kill -9", the test-case finished. > > The hang can be fixed by adding a missing "require supports_catch_syscall". > > I was wondering, I saw you mention "I've got another series of patches to improve such tests and skip others, and that's what I've been testing with".  Do you have similar fixes in that series?  If so, can you submit them, or share them in a branch? > For fork-related tests, I added allow_fork_tests to be used with require, and sprinkled that throughout. There is no way currently for the debugger to be notified of forks and execs. There is no protocol between debugger and Cygwin for that. So all fork tests fail. So for gdb.base/catch-fork-kill.exp in particular, that's what I did: diff --git a/gdb/testsuite/gdb.base/catch-fork-kill.exp b/gdb/testsuite/gdb.base/catch-fork-kill.exp index 0fd853b9085..224a8dfec89 100644 --- a/gdb/testsuite/gdb.base/catch-fork-kill.exp +++ b/gdb/testsuite/gdb.base/catch-fork-kill.exp @@ -32,6 +32,8 @@ standard_testfile +require allow_fork_tests And then, the Windows backend doesn't currently support multi-process at all, so all tests exercising that fail, sometimes with cascading timeouts. So I added allow_multi_inferior_tests for that. I did initially try to fix the testcases individually initially, one by one, to gracefully handle fork-related (and multi-inferior-related) things failing and bailing out early, but it was turning into a time sink for not much gain, and I then decided to apply the "require" big hammer to move on. Here's the subject lines of the testsuite-related patches (and gdb patches that the tests depend on) that I'd like to submit, which mention the testcase names. Some are WIP, and some are hacks that probably should be done differently. I'll need a bit to clean them up somewhat, add commit logs, etc. and either post them to the list or push them to a branch. I should probably do this piecemeal, a patch at a time. # gdb.multi/attach-no-multi-process.exp: Detect no remote non-stop # gdb testsuite: Introduce allow_fork_tests and use it throughout # gdb testsuite: Introduce allow_multi_inferior_tests and use it throughout # Make gdb.threads/watchthreads.exp fetch registers of all threads # Windows GDB: Avoid hang second attach (gdb.base/attach.exp) # gdb.threads/schedlock.exp: Expected SIGTRAP too # Windows all-stop, interrupt with "stopped" instead of SIGTRAP # gdb.threads/schedlock.exp: handle "stopped" too (to squash) # Extra "maint set show-debug-dregs" debug output (submit separately) # Fix gdb.threads/multiple-successive-infcall.exp on Windows (depends on schedlock) # Software watchpoints and threaded inferiors (submit independently) # Skip gdb.base/libsegfault.exp on Cygwin (submit independently) # gdb.threads/thread-execl, don't re-exec forever (submit independently) # Support core dumping testcases with Cygwin's dumper (submit independently) # Skip gdb.base/many-headers.exp on Cygwin (submit independently) # Fix gdb.threads/multiple-successive-infcall.exp on Cygwin (hack) # Adjust gdb.base/sigall.exp for Cygwin (submit independently) # Adjust gdb.threads/schedlock.exp for Cygwin (submit independently) # Adjust gdb.threads/multiple-step-overs.exp for Cygwin (submit independently) # Adjust gdb.threads/step-over-trips-on-watchpoint.exp for Cygwin (submit independently) # Adjust gdb.cp/cpexprs.exp for Cygwin (submit independently) # remote target pid_to_string for gdb.server/ext-attach.exp (incomplete) # Adjust gdb.base/bp-cond-failure.exp for Cygwin (submit separately) # Adjust gdb.base/bp-permanent.exp for Cygwin (submit separately) # Fix gdb.arch/amd64-watchpoint-downgrade.exp for Cygwin (submit separately) # announce attach should be earlier (submit separately) # Convert gdb.base/watchpoint-hw-attach.exp to spawn_wait_for_attach (submit separately) Pedro Alves