From patchwork Fri Jun 6 19:15:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 894476 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp678749wrb; Fri, 6 Jun 2025 12:16:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvMW5vY1Rl2yortj+5VL/1qIKp7aofgJYhToF2+5F0VOKjAkg5KOXETdP39DevkKIp9zTWeQ==@linaro.org X-Google-Smtp-Source: AGHT+IHk/njQRzUzrRhItVuIddhGmkuXgUMw6QpaUXFvdUWBh28ObJyNXsjnG+dFb4gFJSuKM/bN X-Received: by 2002:a05:620a:4105:b0:7c5:3e89:c6df with SMTP id af79cd13be357-7d229861579mr665884085a.12.1749237362357; Fri, 06 Jun 2025 12:16:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1749237362; cv=pass; d=google.com; s=arc-20240605; b=NVTogZzmax1Q/79BK7bq9BC3hPKHIrKAUd8EvDM1LKG1dIV/aJG4JGSzq5b+NlHv6C ydukBFaPdIMBk8MmesUkjbmQpjjYkxMd/nlAY7DuONaHZU0QZbDn5+1CvbfKP3lCxZdy vfibtnAKYFIbGVykcjztw0IprQ8wxV0Lneb1/uajsqXLZDeKfVRT8biwy1V1fN+2ka0Q MOp3Cw6FQbRB+R5BPOJ/zzx6ypqBraW6ispKnGZAPFSqaJtxExKK+6XTLmVyuE/Ct71p gGclhWJ8hNaR+pvuCm0XaRVcw0BbI3sJgWe9xCfyFH4Wdwv1UwYnrhOKPaKWZgt9F196 L71Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-filter:arc-filter :dmarc-filter:delivered-to:dkim-filter; bh=ShoF63Cm38tEGssH021w36ssNA7+n3ziMabpR7pKEgo=; fh=72kqq0iQhigvR9Vv/oqX5ebs3Yyyw7XhzWxOOEPdupI=; b=GP3LclW7lh1Z134sLjha6Fe7xDOioXJfnwspf7ePppQbppF8Nhd/ZzdAUSb3z+1Zm8 JIurjXVj6qa7kFyg9imV5a2FElF892gjM23mZI6cZcCXJMWsIYJSZ/dSZZt+XqYCtNEl YgdFzyWWc0HTkTxMFBszGJfSxC524S3dSmucFVVt0rLnjtpv4etiMrvGZ2rrgkU4Cy0h HJvXN03LjH94puF+Jh7VFEXX0UXyZhMUl9AAbVUDAjuM13BWTIat2Nkh1uE+SoS17ODA eMeZ9X1yAZs9nSTRBqYTLRmoYig+w3iaaPiyMwnbdN5JbW3hjVc0H2TlOgFsMicQPX7h 58ng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces~patch=linaro.org@sourceware.org" Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id af79cd13be357-7d24b3d0ee8si238013085a.123.2025.06.06.12.16.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jun 2025 12:16:02 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces~patch=linaro.org@sourceware.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BA421385771D for ; Fri, 6 Jun 2025 19:16:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA421385771D X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by sourceware.org (Postfix) with ESMTPS id 3D141385771D for ; Fri, 6 Jun 2025 19:15:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D141385771D 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 3D141385771D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749237331; cv=none; b=YKCAM/mGDgEqIsh0OeyzPZ/GXcNptW/S8D3E74G+aB/maSh+RYnigqzKl39hiPPYztd04eq2a3zCeV/3/VRB4X+ZUsOxYENBaRk5yki4tJF7OU4EErtvfiSUO/KykhBD3UUBFuhWjgsHgFpG/XV3XIbNih6Lfvfa9j3tB83Yoys= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749237331; c=relaxed/simple; bh=yDNyP+zhtkQuAW9SjsgmVIXTdVxN+copF9IZ31hkloc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=nURAPuz55M9z1oJl+dyBl7qoZgTsk9fbk14XFWiLiswH4Vb44T16ny4Ort1LzoEIqiNNT/o8vs7U5nP6oRfmuMp4PnKqasi5QJJpsBko0pz/NyXHzDPJ46FTtahb5x2ha6njehHbcl8/8sFpt7ko1BzLC5L7PdhD731s5x7RUpg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D141385771D Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-450cb2ddd46so16618745e9.2 for ; Fri, 06 Jun 2025 12:15:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749237330; x=1749842130; 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=ShoF63Cm38tEGssH021w36ssNA7+n3ziMabpR7pKEgo=; b=FwbnLH5Dx/dryxkd81/lhlTlCO+UpcYNFzhpA4WRQM+lv3fAFyzSPfuTHZt4pa1xDG mbhlx2befFN3YeCatdboCSN7y97cEnW1mPNWJoiY8o+sI+lPiVDlJoOxoPgpJ+OrIQJe L7AAk3+F7YTcKDkT2M/y7nFz0GX6R4eRGRViBXGaLK+K72/kIxZzdNtFdF6bGPMLbXnU qP5V8cL25ToyPpPypkOcrcubKWtJtOPmvLoJHqFG9j/hYLWGIafEHnuW2KY5O5TTgJUM VjoQtTksQQr17oQzvUG+15ta6KYMjcRDveiEJ/yZNpAWniADsr1FqwBs6EqZgvQDNOe8 wImQ== X-Gm-Message-State: AOJu0Yw2FQdf+iAXTBKWqQ0imPsG3pbljFw2ClcBiJNP/3gqksNk59FN tCUjQtb+gZgHw+0ZJIdCbA3wh5HGA0tQ5cT0Ae3MvihRHaSbB4/kQ0ZTfGHJZHGh X-Gm-Gg: ASbGncvdfO6BIiw4gNgaHc0PViweBXJgfvOinAg1k6AwE64KVSBcSoQfYws0rEPMSv7 J5yNW7FsoTi5NcSsGdyiXbOV+TgL3xnhglEvpWBf9cure1qN3q17WYwmawSBCPRjsSShzl65jLE 1fXGnJmW9aEJvp33OFsYjEEqZRv0vOaYKZSFm/eJvtfajxw6QZqT6VXtve9lRhwjzkeAS+Wu8Qn 2DdFPVUJg9ecCM3RMXiGJWhXA0GMZcDDUnuoy8MVFRiidWj86RuR8ZrfoL1imu8CB1VQhVErnvn 5ZCoxstEWUH7GbZu/qcpSqVyjp4RcouF/oMeyUBPNaxeu9OUJg== X-Received: by 2002:a05:600c:3493:b0:43d:172:50b1 with SMTP id 5b1f17b1804b1-452013ec5ebmr45183905e9.29.1749237329656; Fri, 06 Jun 2025 12:15:29 -0700 (PDT) Received: from localhost ([2001:8a0:facf:2b00:77f6:647:8d2f:f905]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-452730d175dsm30541015e9.35.2025.06.06.12.15.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jun 2025 12:15:29 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH] Adjust gdb.base/sigall.exp for Cygwin Date: Fri, 6 Jun 2025 20:15:23 +0100 Message-ID: <20250606191523.1003585-1-pedro@palves.net> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 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~patch=linaro.org@sourceware.org The gdb.base/sigall.exp testcase has many FAILs on Cygwin currently. From: Thread 1 "sigall" received signal SIGPWR, Power fail/restart. 0x00007ffeac9ed134 in ntdll!ZwWaitForSingleObject () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll (gdb) FAIL: gdb.base/sigall.exp: get signal LOST we see two issues. The test is expecting "Program received ..." which only appears if the inferior is single-threaded. All Cygwin inferiors are multi-threaded, because both Windows and the Cygwin runtime spawn a few helper threads. And then, SIGLOST is the same as SIGPWR on Cygwin. The testcase already knows to treat them the same on SPARC64 GNU/Linux. We just need to extend the relevant code to treat Cygwin the same. With this, the test passes cleanly on Cygwin. Change-Id: Ie3553d043f4aeafafc011347b6cb61ed58501667 --- gdb/testsuite/gdb.base/sigall.exp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp index b23e3c5951f..461a92b57f2 100644 --- a/gdb/testsuite/gdb.base/sigall.exp +++ b/gdb/testsuite/gdb.base/sigall.exp @@ -41,13 +41,14 @@ proc test_one_sig {nextsig} { setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu" } # On Linux SPARC64 systems SIGLOST==SIGPWR and gdb identifies - # the raised signal as PWR. - if {$thissig == "LOST" && [istarget "sparc64-*-linux*"]} { + # the raised signal as PWR. Same for Cygwin. + if {$thissig == "LOST" + && ([istarget "sparc64-*-linux*"] || [istarget "*-*-cygwin*"])} { set esig "PWR" } gdb_test "continue" \ - "Continuing.*Program received signal SIG$esig.*" \ + "Continuing.* received signal SIG$esig.*" \ "get signal $esig" } @@ -177,7 +178,7 @@ gdb_test "handle SIGTERM stop print" \ "SIGTERM\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*" gdb_test "b handle_TERM" "Breakpoint \[0-9\]+ .*" gdb_test "continue" \ - "Continuing.*Program received signal SIGTERM.*" \ + "Continuing.* received signal SIGTERM.*" \ "get signal TERM" gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM" gdb_continue_to_end "continue to sigall exit"