From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SRV/IO4cQ2gzeAMAWB0awg (envelope-from ) for ; Fri, 06 Jun 2025 12:53:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 696081E11C; Fri, 6 Jun 2025 12:53:02 -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 69D621E0C2 for ; Fri, 6 Jun 2025 12:53:01 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 039813856DEF for ; Fri, 6 Jun 2025 16:53:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 039813856DEF Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by sourceware.org (Postfix) with ESMTPS id 943913857B84 for ; Fri, 6 Jun 2025 16:52:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 943913857B84 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 943913857B84 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=1749228745; cv=none; b=T7CpVltIFbBQMsqf7B6VyFP3BqTlJf12IJnrKjVzzxLEZboIqAknxjZk3jHx2eFRS3NLxi+w7+EjMMZQffJ4VwRiY6u4wOaJzbDb1i8JKB1muazt19Wr4NpsZWNAUhuDdSsreB3OJBqkdPpwmEalKoofcH+vFL1YMmdlRo09lJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749228745; c=relaxed/simple; bh=Dw39mbh7VwIC5iFZA49KUYvXLe+44xAR//k31ZO/RmE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=XlJoPu59m4HBVBZtd9lcNabZkTffTgGuGWDd9ToH7gSeaA47H/YbnWFWQ+A6P2dpwwDOsbP95Y7AW3SmCnxf8pgjAp5kqAPHBvMZcelpv7HhowPe/xaobCVxKEC8TcyGj/hE5bu6jAmfdY62g36A7v198YZF/Pk6IKtjd5oi6Ko= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 943913857B84 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-451ebd3d149so15427105e9.2 for ; Fri, 06 Jun 2025 09:52:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749228744; x=1749833544; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EknBE9IMHlpUWiGazCLbPai+tmwJQrGKmIhm4g8ODtc=; b=ghzJw6MOc7gmvq5LBQ/VClIUVZVlTBeg8io9XyY1Av9VX3OqpYAFG6YEQDI4dT70gT 1Jvy8aqKO7lhtbZa3+AgdEi5V1ivnAe/02eNLOvF7Bdy+wONSXowCqdq0UILzEI+PhF8 2fQbTsZvnSNzVAz2tg/abePgK86SEcC/nt6vtmbVP3wxo29IXpD3a5HUubAJbz9VJ1e7 P4E/lU0H7k4b8fkPgsTAA2yUmkJvfRU/o0cEMwRlHgUpkeWznAorrfnVcuM9lm/F0gXU +CEN3i9+Y/c2G7d+h4p+63G1eWBw0rYXwb5Jxu5UPEis7AWsVuOSPr7tlXYUxf4ICkWE 8cXg== X-Gm-Message-State: AOJu0YzXg52mOPPSxfnnJmBF0hQA64DtNp92e/op5kr0slUcT/g2G8QQ B/CnAIGwu/YkHYWEsqCWOVbUu7zMkGBbiP/YVu41mhg9D47FRsqkifYK3FPZXlk4 X-Gm-Gg: ASbGnctMnwpEEuVvhKgColrNGQ8rN1+liOgEYcliBNJBDeX3Cyhu4odSHjsCfo5TVX5 h2OrlUea4M+I1geiopbg8aDd71z3Oq4kvV5WHjr75PUbguhEJOzQApxbtpefW0BEQhLvBhIg3hF XWsrP/bg4nFpzBS1bdx9rl3gjb/2Adt+5zN7OlR74PBeRDqbvK8XENvUtFnnFQno8WbIr+ddm/h 7EU6Mw9C7tV3Fo0NWsJKBd/p6OQbkFbcdv9WaSqcWfb2DwEz1lUXeD0QawbqNsDdMxTP119VKuR TJeov75Dzjxr109KZGkv5GRU5mNu+u++no4cmW9BQg87wZWpDR0KeEkx0KZB X-Google-Smtp-Source: AGHT+IGKVqwTJTtkH/YM8XP49rznS3F21bcD6qLZbGF5ITa5eBrzoPwg5Y2XBpHllx9k1RCojk0D/Q== X-Received: by 2002:a05:600c:1c1b:b0:44b:1f5b:8c85 with SMTP id 5b1f17b1804b1-4520139c741mr45256745e9.13.1749228743933; Fri, 06 Jun 2025 09:52:23 -0700 (PDT) Received: from localhost ([2001:8a0:facf:2b00:77f6:647:8d2f:f905]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-451f82871a4sm42082805e9.0.2025.06.06.09.52.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jun 2025 09:52:23 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH] Adjust gdb.base/bp-cond-failure.exp for Cygwin Date: Fri, 6 Jun 2025 17:52:19 +0100 Message-ID: <20250606165219.968227-1-pedro@palves.net> X-Mailer: git-send-email 2.49.0 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 Currently on Cygwin, I get: Running /home/alves/gdb/src/gdb/testsuite/gdb.base/bp-cond-failure.exp ... FAIL: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: single-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=short: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=short: cond_eval=auto: single-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=int: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=int: cond_eval=auto: single-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=long long: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=long long: cond_eval=auto: single-loc: continue On GNU/Linux, we see: Breakpoint 2.1, foo () at .../src/gdb/testsuite/gdb.base/bp-cond-failure.c:21 21 return 0; /* Multi-location breakpoint here. */ (gdb) PASS: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: multi-loc: continue While on Cygwin, we see: Thread 1 "bp-cond-failure" hit Breakpoint 2.1, foo () at .../src/gdb/testsuite/gdb.base/bp-cond-failure.c:21 21 return 0; /* Multi-location breakpoint here. */ (gdb) FAIL: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: multi-loc: continue The difference is the "Thread 1" part in the beginning of the quoted output. It appears on Cygwin, but not on Linux. That's because on Cygwin, all inferiors are multi-threaded, because both Windows and the Cygwin runtime spawn a few helper threads. Fix this by adjusting the gdb.base/bp-cond-failure.exp testcase to work with either single- or multi-threaded inferiors. The testcase passes cleanly for me after this. Change-Id: I5ff11d06ac1748d044cef025f1e78b8f84ad3349 --- gdb/testsuite/gdb.base/bp-cond-failure.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.exp b/gdb/testsuite/gdb.base/bp-cond-failure.exp index d6454549b48..4d03e7bc5fe 100644 --- a/gdb/testsuite/gdb.base/bp-cond-failure.exp +++ b/gdb/testsuite/gdb.base/bp-cond-failure.exp @@ -75,7 +75,7 @@ proc run_test { cond_eval access_type bpexpr nloc } { "Error in testing condition for breakpoint ${bp_num}.2:" \ "Cannot access memory at address 0x0" \ "" \ - "Breakpoint ${bp_num}.2, foo \\(c=49 ...\\) at \[^\r\n\]+:\[0-9\]+" \ + "(Thread \[^\r\n\]+ hit )?Breakpoint ${bp_num}.2, foo \\(c=49 ...\\) at \[^\r\n\]+:\[0-9\]+" \ "${::decimal}\\s+\[^\r\n\]+ breakpoint here\\. \[^\r\n\]+"] } else { gdb_test "continue" \ @@ -84,7 +84,7 @@ proc run_test { cond_eval access_type bpexpr nloc } { "Error in testing condition for breakpoint ${bp_num}:" \ "Cannot access memory at address 0x0" \ "" \ - "Breakpoint ${bp_num}, bar \\(\\) at \[^\r\n\]+:\[0-9\]+" \ + "(Thread \[^\r\n\]+ hit )?Breakpoint ${bp_num}, bar \\(\\) at \[^\r\n\]+:\[0-9\]+" \ "${::decimal}\\s+\[^\r\n\]+ breakpoint here\\. \[^\r\n\]+"] } } base-commit: e9770f7889e72297a179b5596894f4bbdb105224 -- 2.49.0