From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YayZBMvl+WmlvhYAWB0awg (envelope-from ) for ; Tue, 05 May 2026 08:42:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 0E0CB1E0BA; Tue, 05 May 2026 08:42:51 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 95C811E067 for ; Tue, 05 May 2026 08:42:50 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 432324B9DB68 for ; Tue, 5 May 2026 12:42:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 432324B9DB68 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by sourceware.org (Postfix) with ESMTPS id EB3474BA7989 for ; Tue, 5 May 2026 12:42:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EB3474BA7989 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 EB3474BA7989 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777984947; cv=none; b=wM8IkK3hrW9t+0y8w0WuZgPDEsRHiRpRz6CqbCHQNPXFcheFASl2+lQeaFw8IDAvWF95JkeKZ47MSGC0P7IAnkuBOjVPqGkkggimW1Ssx350UJq1Sp+nsLEhtuoBxdbyGCxLcI4BAZZStaAps7wWescM8HDh41p0CrxdqJ2OVBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777984947; c=relaxed/simple; bh=10CxRj8hNjhWf+a6QZ5dWePjXqC1li1L8hv0gGnXuzU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=f03Z2oG5CJX7mUzvfKdoPMijP4S/bQkT5LShhvWLzKwZ6PsQ5iZlSNHA/US5Omp0MmdBWInqHUIhzeHoZHDwcl/daK9vhLFtLg5tbh2wNzRWKInLGNKvi7jJfNLxLL19wneqKI8mUaft8TiucVdt76kZmnUpWDa/zeujJUGSb9E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB3474BA7989 Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-43d7e23defbso2945364f8f.0 for ; Tue, 05 May 2026 05:42:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777984945; x=1778589745; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Vbahhd/pr6sGcwhNJNwF2Wy2nHVCrVBdKSCXEeviqb0=; b=Lux4ePz3rSmS513O3dN4ixo86IpKfN+x2Ei4U0zCZLR3BMO7vKNZJGfSS5yTW/e4c9 R5sOSs3Xtz4jV6AtT9N1bt0NRWX2uNbYI8c88LSzLoTbV13e+BSprP7uFe/TrRoE+ATc XrEDylnaLTMHPZMacPi3YXuB12Ec2iA9Zp53vujVYTsqqPTPW2us3Rsy7Sa6nBKolE2d lpq15tbd5JcKJz44e8f34Oz6/vA4iB+4fvMIwhBqlqfW4Hn4CCyZG1WO5fdbabH+bW40 TaW7cDNhIcyoFLEyYk9MgLm2oaxIgU4L0mBz1U/Qe+D0dtRChMJsgloHeNWSnBkgo1k+ dryg== X-Gm-Message-State: AOJu0YzCSpRtU5299I7cfDbm5haZoSnsEDKjHcTliQNDW4bm/UmfwjON 3idIjcaJgGwviyLUSby/XMpQo1OjYVzx1OC+jxYskKKJMi223WDPVJCiJALqQw== X-Gm-Gg: AeBDievz8srrM76bdgjTcCXGZzdYxE+e2qkvu1YX1GM+BCKr1QP/7Pn7kUq5k9pzY2k KbckBtYEI55j+CgpQ/QCMmx4lKRLpoLColAGBYIWeMWRrls28l0SoUOjMURea9ruQ+K7tR85aek zqhTq02mOu7XMyfLXxeYotmMRkOqSQecIMhlM5TpYG0xyAscY82HX5+dwLs0pRgsV37GACsQeOs ML8RvmCvuARKQnwbqOxV9wQ3IMAtYBxhqecNLUsctD5e+KsR2x6YSgR5xMHNfqIkiUnyXHbr7/3 bKRvavAmCfE9t97/J3y+X4kl3D4JXcRA7tRdOMv/mzUEXGQZ3xQSqRW2I5JLZJmrsnjIQQg8HSz R/pRuH/GI/QR9vXxSRMqu2fm5KaEAH/o+c7sk3ds1ZlYaX8jCUfPvg8kGO3O91EJpXcDDx19NNH +deVHRwzXNmsqwq5xQA8QOz9vm5JApwnoK X-Received: by 2002:a05:6000:228a:b0:441:1c18:f779 with SMTP id ffacd0b85a97d-44bb6ab18ccmr22094448f8f.37.1777984945330; Tue, 05 May 2026 05:42:25 -0700 (PDT) Received: from localhost ([2001:8a0:facb:a800:d362:b803:ffc5:8f78]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-45052a48f63sm4213885f8f.16.2026.05.05.05.42.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 May 2026 05:42:24 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 3/3] Adjust gdb.threads/step-over-trips-on-watchpoint.exp for Cygwin Date: Tue, 5 May 2026 13:42:10 +0100 Message-ID: <20260505124210.1450101-4-pedro@palves.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260505124210.1450101-1-pedro@palves.net> References: <20260505124210.1450101-1-pedro@palves.net> MIME-Version: 1.0 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 gdb.threads/step-over-trips-on-watchpoint.exp fails on Cygwin with many casding timeouts: Running /home/alves/rocm/gdb/src/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp ... FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=off: no thread-specific bp: step: continue to breakpoint: run to breakpoint in thread 2 (timeout) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=off: no thread-specific bp: step: find addresses: clear watch_me (timeout) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=off: no thread-specific bp: step: find addresses: watch watch_me (timeout) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=off: no thread-specific bp: step: find addresses: continue to watchpoint (timeout) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=off: no thread-specific bp: step: find addresses: find addresses (timeout) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: displaced=off: no thread-specific bp: step: find addresses: delete all breakpoints, watchpoints, tracepoints, and catchpoints in delete_breakpoints (timeout) ... many more ... The problem is that the testcase assumes that the program's child thread is GDB thread ID 2. This commit removes that assumption. It now passes cleanly on Cygwin. Change-Id: Ief28e6ebf47abdcd2e71c5f2c70caf2d8753ef5e commit-id: 7207e3c2 --- .../step-over-trips-on-watchpoint.exp | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp index 0a0c5edb97a..cb87f039c78 100644 --- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp +++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp @@ -53,6 +53,20 @@ proc do_test { displaced with_bp } { continue } + gdb_breakpoint "child_function" + + # Don't assume the testcase's child thread has GDB + # thread id 2. On some systems, like e.g., + # Cygwin/Windows the OS/runtime spawns helper threads + # before the child thread is spawned. + set thr_child "unknown" + gdb_test_multiple "c" "run to child thread" { + -re -wrap "Thread ($::decimal) .*hit Breakpoint .*, child_function.*" { + set thr_child $expect_out(1,string) + pass $gdb_test_name + } + } + gdb_test_no_output "set displaced-stepping $displaced" set line [gdb_get_line_number "set wait-thread breakpoint here"] @@ -60,15 +74,17 @@ proc do_test { displaced with_bp } { return } gdb_continue_to_breakpoint "run to wait-thread breakpoint" - gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads" + gdb_test "info threads" "\\\* 1 .* $thr_child .*" \ + "info threads shows all threads" gdb_test_no_output "set scheduler-locking on" delete_breakpoints gdb_breakpoint [gdb_get_line_number "set breakpoint child here"] - gdb_test "thread 2" "Switching to .*" - gdb_continue_to_breakpoint "run to breakpoint in thread 2" + gdb_test "thread $thr_child" "Switching to .*" \ + "switch to child thread" + gdb_continue_to_breakpoint "run to breakpoint in child thread" set address_triggers_watch "" set after_address_triggers_watch "" -- 2.53.0