Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3C4FCAC5A5 for ; Thu, 25 Sep 2025 12:38:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F59210E906; Thu, 25 Sep 2025 12:38:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Dg9IVTGy"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id B247210E906 for ; Thu, 25 Sep 2025 12:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1758803894; x=1790339894; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dwrg2+9x7VCTCe5BTxqwqlcpDwpw3Dp1JmN7lSADcK8=; b=Dg9IVTGyPA2+H2LE5KG3+watb5Jkjmo+CXLdcDpG9W5K2mjtbierTZvv G3cY6G6u/SQQfTJULiGoQ3FgTT6DBLn+dH+P+fU4IHxxQLyLlYiWw10+3 Zcoybp2bfQqA2YOFNsgpiGHYytRsddDc40YVQOtMz//5/pF2rlttpYbQK 5ySa6voWbI2EmDzqHrxOksTcg2ACLb8Vz5yRMvJba64zF29sWTQIFRBf/ MvlQ1T3xsZL5toPALNc3fr9kZitOHwNYECB/fKvKmMc1MY0NYX2oW6QbP 4oidSQylwGKeuPfqjZaElInESX2Fv5rr0Ry2rOMVA+v9Hc6HwAPbwXd+4 g==; X-CSE-ConnectionGUID: rLlYUYebRDyeHjSKpDfjEw== X-CSE-MsgGUID: VBNJ5+UNTsefGQtudLkqNw== X-IronPort-AV: E=McAfee;i="6800,10657,11563"; a="61226519" X-IronPort-AV: E=Sophos;i="6.18,292,1751266800"; d="scan'208";a="61226519" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2025 05:38:13 -0700 X-CSE-ConnectionGUID: bdua6JMJR+eo9Xj/e5GPkQ== X-CSE-MsgGUID: qDGi0pVOQpyj+ES1x+/08w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,292,1751266800"; d="scan'208";a="176894475" Received: from pgcooper-mobl3.ger.corp.intel.com (HELO dpiatkow-mobl1.mshome.net) ([10.245.244.53]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2025 05:38:12 -0700 From: =?UTF-8?q?Dominik=20Karol=20Pi=C4=85tkowski?= To: igt-dev@lists.freedesktop.org Cc: =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= , Mika Kuoppala , Christoph Manszewski , =?UTF-8?q?Dominik=20Karol=20Pi=C4=85tkowski?= Subject: [PATCH v6 i-g-t 6/9] tests/xe_eudebug_online: Improve issuing SIGINT in set-breakpoint-sigint-debugger Date: Thu, 25 Sep 2025 14:37:42 +0200 Message-Id: <20250925123745.15721-7-dominik.karol.piatkowski@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250925123745.15721-1-dominik.karol.piatkowski@intel.com> References: <20250925123745.15721-1-dominik.karol.piatkowski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Use xe_eudebug_debugger_kill instead of pthread_kill. Wait for the SIGINT handling to complete before closing the debugger fd to avoid tripping over asserts. Signed-off-by: Dominik Karol PiÄ…tkowski --- tests/intel/xe_eudebug_online.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c index aa58e5f99..e388ea888 100644 --- a/tests/intel/xe_eudebug_online.c +++ b/tests/intel/xe_eudebug_online.c @@ -1600,7 +1600,10 @@ static void test_set_breakpoint_online_sigint_debugger(int fd, else if (event_count > 0 && event_count < events_max) sigints_during_test++; - igt_assert_eq(pthread_kill(s->debugger->worker_thread, SIGINT), 0); + xe_eudebug_debugger_kill(s->debugger, SIGINT); + /* Don't close debugger fd before it dies */ + while (!s->debugger->handled_sigint) + usleep(1000); close(s->debugger->fd); igt_assert_eq(READ_ONCE(s->debugger->worker_state), DEBUGGER_WORKER_ACTIVE); -- 2.34.1