From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sUtwDGG7Y2olwSsAWB0awg (envelope-from ) for ; Fri, 24 Jul 2026 15:22:09 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=fYKGL43G; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2DBEE1E033; Fri, 24 Jul 2026 15:22:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 A73861E033 for ; Fri, 24 Jul 2026 15:22:08 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 384644BA2E19 for ; Fri, 24 Jul 2026 19:22:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 384644BA2E19 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=fYKGL43G Received: from CH5PR02CU005.outbound.protection.outlook.com (mail-northcentralusazon11012028.outbound.protection.outlook.com [40.107.200.28]) by sourceware.org (Postfix) with ESMTPS id 18EDE4BA2E0B for ; Fri, 24 Jul 2026 19:21:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 18EDE4BA2E0B Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 18EDE4BA2E0B Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=40.107.200.28 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1784920896; cv=pass; b=mazpBWHH5t8+FZHsSKHEgudj5qh5wF1hwS1LINRZENgx5KwHlaWB+W3nNfrfYcR3+Rhpk6mprQGxZJFSRmxP3sOMis4lw66opAO/eFChsBXIS7kR1doF1fpJPoHf70hQhzPLaQ6BeAt9M54fkD5CIBpNrqOuHgitJI/W4iTF8lE= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1784920896; c=relaxed/simple; bh=oXs+yyxs6C+S1nG1dPqcMEsBfelsuSFKX00ggI2+cgw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CsY4DhLavsu82jW7dDZUmrsp7q1tdxIpeh4WKkBTkMddjAcaNXnIRAXNxhqXK6xNdvo0h59c/RIwGAF1JwclXxgnDdsFjE/zacXl91mLiHrhNsQihfUfh0Qr+45Z231w5el27UozK8Bg35pWrbUVh2TyRIgkB1f2hjhLXkVtnIk= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=fYKGL43G DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18EDE4BA2E0B ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xa+0p2OYMVyb35Sx5tiJiEf5mUcJUHtEF/cHPBVezwYbc+xSyYzPbsrEO72YwtUL0g6PiE11RmDqeWVSIZU6GYtmAo0LtorOsDVmCnU68AtXOTUF6d0n4zDDKdFhMm+GmQ7pKaT+MORwIxOSl8m0kZ5+rOd3fZ0c6klMEX1jaJU+ndpgzNI64eKQZZDhiTY+uuwaDjOzGN2lG180LDjjrSRDsNIrZwvmDgxO9gzNCYCUfICxVirBmU6hAf8qmLzJQ2lt6CH43IuVzHZvgucYj3DFjmmFSlpN5FRi4/l0E60Git+HUUYsyf1Lj1tgiHbc8O+Mk2YB5TeTG2l42/ZZxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FSThChdZAhtm+Ma+fvjx+nBCtwvcto93hj8yoEINl3s=; b=YPCrEydB0dpzzz5lRlMy8B0QLWZPg8DyBK6V65uue/8yH0lDdDBZ8u/8mlXKw35VVMDGy5DdJHvzjcATiDKDgaq4rKnD4aJbFQWbNseQ//z9c1aR+8ucVFbCJVKnQXcnMIFsWavLV0vCS2yEcAaBU5rwWG+3du3APP3dpdoBW1rlfKTtkQn2ewQYZctCzIJnd0NoPbYlm6jfiuOPUB/R9FPr09/CKwUkakZFpL3eUIy4qMSOZ8Dy0ug/CHwnKRC36hHVMP3MTfuT/+Mst6UyCL3mjqrq9kYbojpRalcJJHRL+FyfkaZ017JQ5djEelG5REmyGvMKEiva6aF1TcxNcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FSThChdZAhtm+Ma+fvjx+nBCtwvcto93hj8yoEINl3s=; b=fYKGL43GsdG8xcFIxST7Cpb3BU3YzFvqQqN2Euuz3qNGB58XWv4Op8pNJxmtqYP98mKDcNUP1AfxZHjAXKIZNLwddkgcwAHyGH7C4XeakJgxq+YDHqioA1QX4tfWnyKbGMZ2Md4eqpWdAy7MyNW5ZIFrAVnulROwcpFuUoJAfIk= Received: from CH0PR03CA0269.namprd03.prod.outlook.com (2603:10b6:610:e5::34) by CY8PR12MB7610.namprd12.prod.outlook.com (2603:10b6:930:9a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.12; Fri, 24 Jul 2026 19:21:28 +0000 Received: from CH3PEPF00000009.namprd04.prod.outlook.com (2603:10b6:610:e5:cafe::ab) by CH0PR03CA0269.outlook.office365.com (2603:10b6:610:e5::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.11 via Frontend Transport; Fri, 24 Jul 2026 19:21:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by CH3PEPF00000009.mail.protection.outlook.com (10.167.244.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Fri, 24 Jul 2026 19:21:27 +0000 Received: from atlantis.fritz.box (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 24 Jul 2026 14:21:26 -0500 From: Shahab Vahedi To: CC: Shahab Vahedi , Lancelot SIX , Simon Marchi , Shahab Vahedi Subject: [PATCH 2/2] gdb.rocm/watchpoint-basic: add XFAILs for known configurations Date: Fri, 24 Jul 2026 21:20:54 +0200 Message-ID: <20260724192054.11399-3-shahab.vahedi@amd.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260724192054.11399-1-shahab.vahedi@amd.com> References: <20260724192054.11399-1-shahab.vahedi@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF00000009:EE_|CY8PR12MB7610:EE_ X-MS-Office365-Filtering-Correlation-Id: 626ed066-65fb-4375-3615-08dee9b8c287 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700016|1800799024|376014|23010399003|18002099003|22082099003|56012099006|11063799006|3023799007|13003099007|6133799003|10067099003; X-Microsoft-Antispam-Message-Info: RF5C2/urk70itbL23zL2a1ig+It4CjXuvGIYIaw+spgFPtvhJH6FLiWQsGeOzNvGyy1tgbFD5yLjgpV4YRWIYuqd18u3wx7esMM1YhTSiLJ1NWbAQfboMl4+NnxTAQpLHvfP+nFYEd2XxC36kFc8oKU+th/F5VgiFeyqiwg5LEBJ+WGxo39skIDDUC9fltzJguRGeIom5xCIvDPvXBtw7kmxFmMrbvKH/M8yZz47AbnX+jVLtzCEc5ExHqn1PIqBeinTaQb/tA6XVy2qciepaKk+QdFQadCSjJ7AaQDMLelxrpAVtjfBKcI8iKBpWSe4UuAaXukFeaa5nNgvKTAYldVAPSmQ+tvb877QzG/zx7kK+fasWPUR8+IlBjJL3phmzV6nrDVRhVA4Lhc/zbfb02ZsldExm+gOCf+QvoYHhXaQWAOqyxRcut9Vx37DwyBaeTLWR5HylmcHGqrVewmNmBJTOX6XkqkpzJpWVaMBT8eSfxB7oE3XMf32ajLtMdI5KnaGYbRARn3nHzBfYb4x8E+okP6qhup2w6chmQB40iot35FmpRclP9njhUtnkbNZztmnFWMFgqFcdUu8/AoYqinKT2DBMvvH2ZldarA7B8+qpsyNKXV8M449HAz0Y4+AWSv7/ClVzBahhknkFT5yCQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(36860700016)(1800799024)(376014)(23010399003)(18002099003)(22082099003)(56012099006)(11063799006)(3023799007)(13003099007)(6133799003)(10067099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fZELALiYreypXfwnu7yhSDEi8/K/6m+bkAFgqfAIxSs51CgULZROI2efgOtz9DBcRnpdtOiVoJd4p6Evv6icjpKm1LJEd0H7A+tE9Us7PP5/Xnn9etXsZ1souMSADmzjeYz9/4AkXTYAibMN+TQdKqYxWiv335gp/AtmCVBnF87r1NjK4bbFic0eCf3uU2gsjPfBzJuphHKdWHAk6bjxH41Si16QCtIm0hwPdHN5yQxMkJIXwid6aDHMwYrcuthnHmoe8HJI1ADO6M4Wi0krz5iN0oJlQI91y4d4HXvOFzwFRObuNT8fA+KQAzBvlWN7iTHJcElGRCOf3oeNQvgzdJ3xllMDJBNX6gReFf8izunGTEYTa1lbBJC3sNTsIdrqREtdhAxcKvCtMEC5EIl8e6mb7JTpu5c0jcH7jxvUiySdC3OV8JlAr/zG6jZcp/fq X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2026 19:21:27.9563 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 626ed066-65fb-4375-3615-08dee9b8c287 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF00000009.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7610 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 Some of the tests in gdb.rom/watchpoint-basic are destined to fail due to a problem in KFD. This patch marks those tests as such on configurations that this can happen. Change-Id: Iafd40b18bf8eb7004c8653bca1407b8d86ca0032 --- gdb/testsuite/gdb.rocm/watchpoint-basic.exp | 78 +++++++++++++++++---- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/gdb/testsuite/gdb.rocm/watchpoint-basic.exp b/gdb/testsuite/gdb.rocm/watchpoint-basic.exp index 9626b32d5d2..bc30726515e 100644 --- a/gdb/testsuite/gdb.rocm/watchpoint-basic.exp +++ b/gdb/testsuite/gdb.rocm/watchpoint-basic.exp @@ -26,14 +26,25 @@ if {[build_executable "failed to prepare" $testfile $srcfile {debug hip}]} { } proc continue_to_watchpoint_hit { old_value new_value test } { - gdb_test "continue" \ - [multi_line \ - "hit Hardware watchpoint $::decimal:.*" \ - "" \ - "Old value = $old_value" \ - "New value = $new_value" \ - ".*"] \ - $test + set hit_re [multi_line \ + "hit Hardware watchpoint $::decimal:.*" \ + "" \ + "Old value = $old_value" \ + "New value = $new_value" \ + ".*"] + + set ret false + gdb_test_multiple "continue" "$test" { + -re -wrap $hit_re { + pass "$gdb_test_name" + set ret true + } + -re -wrap ".*$::inferior_exited_re.*" { + fail "$gdb_test_name" + set ret false + } + } + return $ret } # Test inserting a watchpoint on a host variable before the runtime loads, and @@ -78,6 +89,37 @@ proc_with_prefix test_host_watchpoint_after_runtime_load {} { } } +# On some systems, KFD corrupts the watchpoint configurations +# during the first dispatch's queue mapping. This leads to +# watchpoints not being triggered, if they were set before the +# first dispatch. As a result, those test scenarios run to the +# end and exit prematurely. + +gdb_caching_proc target_has_xfail {} { + set xfail_arches {gfx1201} + + set targets [find_amdgpu_devices] + if {[llength $targets] == 0} { + # Can't determine GPU type, don't set up xfail. The test will probably + # not run correctly anyway. + return 0 + } + + # The test will run on GPU-0, so it should be the first of the list. + set target [lindex $targets 0] + + return [expr {[lsearch -exact $xfail_arches $target] != -1}] +} + +# This is used when dealing with the first watchpoints that are +# set before the first dispatch. + +proc maybe_xfail {} { + if {[target_has_xfail]} { + setup_xfail "*-*-*" "watchpoint configuration corruption in kfd." + } +} + # Test inserting a watchpoint before the kernel is launched, then hitting # it when the kernel runs. @@ -93,7 +135,10 @@ proc_with_prefix test_watchpoint_before_kernel {} { "Hardware watchpoint $::decimal: .*" \ "set watchpoint on *ptr1" - continue_to_watchpoint_hit 0 10 "continue to watchpoint hit 1" + maybe_xfail + if {![continue_to_watchpoint_hit 0 10 "continue to watchpoint hit 1"]} { + return + } continue_to_watchpoint_hit 10 30 "continue to watchpoint hit 2" continue_to_watchpoint_hit 30 40 "continue to watchpoint hit 3" continue_to_watchpoint_hit 40 60 "continue to watchpoint hit 4" @@ -145,7 +190,10 @@ proc_with_prefix test_remove_watchpoint_inside_kernel {} { "Hardware watchpoint $::decimal: .*" \ "set watchpoint" - continue_to_watchpoint_hit 0 10 "continue to watchpoint hit" + maybe_xfail + if {![continue_to_watchpoint_hit 0 10 "continue to watchpoint hit"]} { + return + } gdb_test "with confirm off -- delete" "" "delete all breakpoints" gdb_continue_to_end "" continue 1 @@ -170,7 +218,10 @@ proc_with_prefix test_multiple_watchpoints {} { "Hardware watchpoint $::decimal: .*" \ "set watchpoint on *ptr2" - continue_to_watchpoint_hit 0 10 "continue to watchpoint hit 1" + maybe_xfail + if {![continue_to_watchpoint_hit 0 10 "continue to watchpoint hit 1"]} { + return + } continue_to_watchpoint_hit 0 100 "continue to watchpoint hit 2" continue_to_watchpoint_hit 10 30 "continue to watchpoint hit 3" continue_to_watchpoint_hit 100 300 "continue to watchpoint hit 4" @@ -210,7 +261,10 @@ proc_with_prefix test_disable_enable_watchpoint {} { } } - continue_to_watchpoint_hit 0 10 "continue to watchpoint hit 1" + maybe_xfail + if {![continue_to_watchpoint_hit 0 10 "continue to watchpoint hit 1"]} { + return + } gdb_test_no_output "disable $wp1_num" "disable watchpoint" -- 2.55.0