From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id geKpAiEeZ2pq2i8AWB0awg (envelope-from ) for ; Mon, 27 Jul 2026 05:00:17 -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=o2ReCVtt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 050F21E09E; Mon, 27 Jul 2026 05:00:17 -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 726B61E099 for ; Mon, 27 Jul 2026 05:00:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 09E6C4BA2E17 for ; Mon, 27 Jul 2026 09:00:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09E6C4BA2E17 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=o2ReCVtt Received: from SA9PR02CU001.outbound.protection.outlook.com (mail-southcentralusazlp170130001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c10c::1]) by sourceware.org (Postfix) with ESMTPS id 8DB804BA2E05 for ; Mon, 27 Jul 2026 08:58:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DB804BA2E05 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 8DB804BA2E05 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c10c::1 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1785142739; cv=pass; b=NWSgAGumDq+frdp1bXTpsAkL+sv0+jmTbjOZZghshEnsOi7pXZnHPvpGh/vYX9BvW39ZoXN4HwDSjIhv8zDJYYMVV+loTustNDFEXnNuraqJnDsL/Facrx39x71rXAaunLT2ArYEzez4zH/1bYDcfntsm6b9YV5cfioWIKVp9C0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1785142739; c=relaxed/simple; bh=kpyJguh4Q7PCZecG4I7twLM8fIxBaNBfcHPDcrFXnjw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Z5vlEpNUuAQoCIz1dDDVY2xfwbkXTDm9QY1BkQ5Na5ILd8JBLt+cdKI8SPqAgjoVtaaJHZj2cfORULsUzG401SljS2sns+SqVD/vLNNmmJMeNHuwhhaEQxmGoza+5bNL1VuimdJF5y+8y/3L69KYXlhW4GcpknVDPE3QXZw9SvA= 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=o2ReCVtt DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DB804BA2E05 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rmTnlus1Y9LhcrH+YzbvbKEfeIrEWZodSZ9y0gIiPYXaUa7cJjlb8nOmaSC+y/pR8FXC+EfXOCgacAX4cYPEyDmXweM/IdoVOz/e4UIggukyuIjSEdXhNyvL5TFvMaz3Yunz/K+PxvjJp1txI8XXJweaAYqqnPnsNWQj83uiVhlf3pCnhAeUNVp3NTPHqgvZYEhWdtZbZMgq4IrUaPp/YVGoiExyWnw3AMObrNZ7Px83VQcBXYel2JajXMbw6JSfP5PN++adCoUlYDEJpkkSGAawrsTwphAPTSlfwhv5WA7UAnCBIlPF+9sPNAJCbHe/Rxqdz2BxVDWoAjQLyHAyZA== 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=Wfoc0iIqtb1NQnPehyL58RB+GqxaFP9h79Q9CVTnpNA=; b=V7+51Zwx7pZt+Ec0Lhe4zmrP8Uyq23cUq8aYBD068DVAwKeTu8a8s9G1kowGjeOg+j74Y3GCDS1uLHobrzgFHtRni7YIaBvnX0J2EFPkqAEEtJglxO6XFrhvtTYOZ01XaUPSApCta+yZJVNP9ZtKFPxBPq/8z1srDuKelwUKyv0vfNA+Q1mkd0YXRP3GnJvm/92YZF3Fb8q5EKj/mH5y66xqkU0lZs4Vsgz12ITeRXv/gfnvbbq/FxluSTLi17bup3xNSftBUD7MIRqD4lmDjXrv/GiRKtnC1G1D1Ht6/7ulXuplgzNGk3g9aV0GnICUOEuYnuGgYHKeNi1UqCW8/w== 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=Wfoc0iIqtb1NQnPehyL58RB+GqxaFP9h79Q9CVTnpNA=; b=o2ReCVttzVD0joY46BnQfUBVySUtiogcVZytkBNjakUpFGEI4p7591ngV97duQajlogpWkVGgKeznH7Uq+jbVNLGJwDnKeg9uDmOztSxoSc7JJmRrZZOqNzOzXeGz3jZEAe2eUZGxqCqQvxPSidwtG6ICZCt0IXqzJCokh3ndz8= Received: from BL1PR13CA0063.namprd13.prod.outlook.com (2603:10b6:208:2b8::8) by LV2PR12MB5776.namprd12.prod.outlook.com (2603:10b6:408:178::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.12; Mon, 27 Jul 2026 08:58:53 +0000 Received: from BL02EPF0001A106.namprd05.prod.outlook.com (2603:10b6:208:2b8:cafe::3) by BL1PR13CA0063.outlook.office365.com (2603:10b6:208:2b8::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.270.12 via Frontend Transport; Mon, 27 Jul 2026 08:58:53 +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 BL02EPF0001A106.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Mon, 27 Jul 2026 08:58:53 +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; Mon, 27 Jul 2026 03:58:51 -0500 From: Shahab Vahedi To: CC: Shahab Vahedi , Luis Machado , Tankut Baris Aktemur , Lancelot SIX , "Simon Marchi" , Shahab Vahedi Subject: [PUSHED 2/2] gdb.rocm/watchpoint-basic: add XFAILs for known configurations Date: Mon, 27 Jul 2026 10:58:03 +0200 Message-ID: <20260727085803.14004-2-shahab.vahedi@amd.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260727085803.14004-1-shahab.vahedi@amd.com> References: <20260727085803.14004-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: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A106:EE_|LV2PR12MB5776:EE_ X-MS-Office365-Filtering-Correlation-Id: 622875c5-c147-4e96-f1eb-08deebbd487c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700016|1800799024|376014|23010399003|82310400026|13003099007|6133799003|11063799006|56012099006|10067099003|3023799007|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: 7S3xy/0HCal3tDzGs+Sq6the8ESTIAS0+J6+wZOFW7v6XYGMS2FnM5g7ekTZQctk9qt/q6ELIUBxbBx9Monf7UxO+RNpmm9sh7PwOhhNR2IqicDHZq6VqUzLz5ayUd1H393e0DiuFkgmsmYHv1tlMkpKTD56iPwVoOHYL1zqjo70RtvBaPmgvDD3t3M0HBdca5X7GiPwIcCVLL9uta/TcDcctMHWR+uPgB8SdSLNGdGOyOPtDQ54NaVw4t0OARdo0L23WzzySck7w4xyO/VUB+KCP849creHpWEprvkrFr3TG4/OUwgwTe4O2RZ7RCDJ/1sa7DNA/CXmP9zpMrnROwq03t7Ti3F4gMSosWy0pgDGWuet7vb1XtjSLu5BcMvglJ/SzjoS4Lsg24bolUcMu0+sKxxdEMxat/Tt3d5wnQGgEZTNqos6R727F9rfybnrjOeufBKNTGKjD6/+1lylpOwV8B9SRn+4w3IEbuW1GxotgS6YRAVxZCrIVlGLo5hSBzpdihr/gCdox2ipLNtH/vUa4SCWEAQmp7ClJHDme4+2djt+VC5U5+v/kqu/pfIgR4aMEvfuYVPGuzxDPh+d73aWOJfZ0Gv+158crpj45OvtUOYQLhOIGtiabpxSt/eT8YPAR3oMhxAoVCk+ZAWhD544XYJXkNGjOQ6t7Z8aszQ= 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)(36860700016)(1800799024)(376014)(23010399003)(82310400026)(13003099007)(6133799003)(11063799006)(56012099006)(10067099003)(3023799007)(18002099003)(22082099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2ZNmr3CT/bXoSWHJVVDSWGBEbjHsNw2xcrqhI3tOa/T1JgaX0WZwHk3irBnQUQ8p/YL34ZGTDCBHmx4xFN96deKdDTUMHv2lbWiNAs3JZbYqU0Pk4Eywum5j9sqvEVALX16ZfaXgPhd3U67ygoom4ExmM9JeVWUXv8/QopbiXiSrsS1EmLTOMpGyQ8GKbxeRxILv5H5TXEI0/C4SS3Vv7I2BBfUVXOWGsHcwyY8K6HrpMeAtSHJY1y58Bd64cDnnn+kBTX4cS3ND05LGxwQrkPEY8tn694paM4oEkThEtsXUvwIFUhTdv3fTnLKh/wr/yCDZh/42U5NpjqK/c6RWSXmqhFe1klTylXMAloq06qBqtcs5TP2gm2qEEgV8doIyNUfBw4wWTrNNDJeZj8CvwivmF7ql8JDw4vjA8T1aoOmMnzYKSInvC5iZaHCTXdoX X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2026 08:58:53.0244 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 622875c5-c147-4e96-f1eb-08deebbd487c 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: BL02EPF0001A106.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5776 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. Reviewed-by: Tankut Baris Aktemur Approved-by: Luis Machado --- 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