From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yRu+HEp3fGpXmCAAWB0awg (envelope-from ) for ; Wed, 12 Aug 2026 09:38:18 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=TPTBcvVd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7241A1E033; Wed, 12 Aug 2026 09:38:18 -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 [IPv6:2620:52:6:3111::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 DF6071E033 for ; Wed, 12 Aug 2026 09:38:17 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85DBE4BAE7E7 for ; Wed, 12 Aug 2026 13:38:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85DBE4BAE7E7 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=TPTBcvVd Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by sourceware.org (Postfix) with ESMTPS id CB9604BB3BAD for ; Wed, 12 Aug 2026 13:30:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB9604BB3BAD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CB9604BB3BAD Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786541417; cv=none; b=rVnYT5JkVc6sGvgyZw9Yk16FO3w7Vak0m0YD9agV/GkRMgfhKOBn2Muwq8dNo4v1z36qOiORLvmnwVOBAAYeQPoU+vt6BaCgMM0DIOcgE1JGBl8SkaO+pwWjqS++8bYg7otgsXb7sns09zug3PPX+cMQJ+bV+PRZMfkW+qKEjn0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786541417; c=relaxed/simple; bh=Lm3f/bpuXE8Fm3RxCLWft2LJ0Nn4C0HpbkwMFXf635I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pgSMJ2W8aCS5rKrkoLzHl81s1Qy/EIZfD7AyMD2kc4I+0Of/qzNLJf8nZwl1GuQnXXZHU265Tq4Jfa1vVCXbpodbQpNrt3Bqvv50FbBWS6zUjE4Yg9yaTq87wFaT9+t7jCLFgt6e1jL9KixGca6dVVFaFlaSs59VBcvE5LYpZCs= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=TPTBcvVd DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB9604BB3BAD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1786541417; x=1818077417; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lm3f/bpuXE8Fm3RxCLWft2LJ0Nn4C0HpbkwMFXf635I=; b=TPTBcvVdsJKVJAP8qJTYaHrZ7ooQNxr8Moo249kDYUj+dztbkcpfvk3m rWU1+ucd/PcLPuTJNaZqU1Kc3VZU+jABmakf2eHi8LaMiRe4ll19JsvJ3 bXHvHFcxkTPoKz+8mOSgnfL1+jd73mRJ5nlGMcqnHanBIjVI2sRHrBuIr v9spuPgLSjcPJje5H0nxsnNUbBKwOJJ27htC0wwuHNEw8VDwjRnEDXz3i 1PSdMqd2tPFuyNNYC7FiywUANXohiWEAv1XC5Fe0UuDXWZsFPMQabM4h2 zd7KfunfJav1UNWx+XGEX0dXPDw6zFoYjtb09aZdmqoZGpWwT7TCfwOTY Q==; X-CSE-ConnectionGUID: WzboL0yhRqW0xDbxadrFXg== X-CSE-MsgGUID: gj8C9iqEQ++/mS6JamVsCg== X-IronPort-AV: E=McAfee;i="6800,10657,11872"; a="90910795" X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="90910795" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 06:30:16 -0700 X-CSE-ConnectionGUID: kQHEADSmTOCL4cnOcvloQw== X-CSE-MsgGUID: KlHfQPnJQHaQ+R5ZIkbjmg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="268804832" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 06:30:15 -0700 From: Markus Metzger To: gdb-patches@sourceware.org Cc: Tankut Baris Aktemur Subject: [PATCH v4 41/44] testsuite, sycl: add test for scheduler-locking Date: Wed, 12 Aug 2026 15:28:01 +0200 Message-ID: <20260812132805.380163-42-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260812132805.380163-1-markus.t.metzger@intel.com> References: <20260812132805.380163-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 From: Tankut Baris Aktemur Add a new test to check that scheduler-locking when inside a SYCL kernel works fine. --- gdb/testsuite/gdb.sycl/scheduler-locking.exp | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 gdb/testsuite/gdb.sycl/scheduler-locking.exp diff --git a/gdb/testsuite/gdb.sycl/scheduler-locking.exp b/gdb/testsuite/gdb.sycl/scheduler-locking.exp new file mode 100644 index 00000000000..96f7d58b8bc --- /dev/null +++ b/gdb/testsuite/gdb.sycl/scheduler-locking.exp @@ -0,0 +1,63 @@ +# Copyright 2020-2026 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Test the scheduler-locker for resuming inside a SYCL kernel. + +load_lib sycl.exp + +standard_testfile parallel-for-1D.cpp + +set sycl_device_list [init_sycl_devices_list] +if {[llength $sycl_device_list] == 0} { + unsupported "target does not support SYCL" + return +} + +if {[build_executable "failed to compile $srcfile" "$binfile" "$srcfile" \ + {sycl debug}]} { + return +} + +foreach device $sycl_device_list { + sycl_with_intelgt_lock $device { + clean_restart $testfile + + if {![sycl_start $device]} { + continue + } + + set first_line [gdb_get_line_number "kernel-first-line"] + set last_line [gdb_get_line_number "kernel-last-line"] + gdb_breakpoint $first_line + gdb_breakpoint $last_line + + for {set i 1} {$i <= 5} {incr i} { + with_test_prefix "trip $i" { + gdb_test_no_output "set scheduler-locking off" + gdb_continue_to_breakpoint ".*kernel-first-line.*" + + # Resuming should make only the current thread move. + set current_thread [get_current_thread "kernel-first-line"] + + gdb_test_no_output "set scheduler-locking step" + gdb_test "next" "int in_elem = .*" + + gdb_test_no_output "set scheduler-locking on" + gdb_test "continue" \ + "Thread $current_thread \[^\r\n\]+$srcfile:$last_line.*" + } + } + } +} -- 2.43.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.