From 194e20b5dacc85aa9ae8fd7400d527ad5d176480 Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Mon, 3 Nov 2025 16:40:06 +0100 Subject: [PATCH 1/6] [SYCL][Unit Tests] Fix regression after https://github.com/intel/llvm/pull/19687 This patch fixes a regression happened after https://github.com/intel/llvm/pull/19687: `check-all` lost the entire SYCL-Unit test suite, so SYCL unit tests did not run for `check-all` target. --- sycl/test/Unit/lit.cfg.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sycl/test/Unit/lit.cfg.py b/sycl/test/Unit/lit.cfg.py index e2e95da2d95e6..83c109d36a664 100644 --- a/sycl/test/Unit/lit.cfg.py +++ b/sycl/test/Unit/lit.cfg.py @@ -5,6 +5,7 @@ import os import platform import subprocess +import sys import lit.formats import lit.util @@ -21,7 +22,15 @@ config.test_source_root = config.test_exec_root # testFormat: The test format to use to interpret tests. -config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests") +config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, test_suffix="Tests_non_preview") +# Workaround, as lit.formats.GoogleTest's ctor takes only single string as test suffix +# and does not support a list of test suffixes. +test_suffix_preview = "Tests_preview" +kIsWindows = sys.platform in ["win32", "cygwin"] +if kIsWindows: + test_suffix_preview += ".exe" +config.test_format.test_suffixes.add(test_suffix_preview) +# End of workaround. # Propagate the temp directory. Windows requires this because it uses \Windows\ # if none of these are present. From 360c60eec4777471a18245722e66c92f41262f45 Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Mon, 3 Nov 2025 16:55:08 +0100 Subject: [PATCH 2/6] Fix clang format --- sycl/test/Unit/lit.cfg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sycl/test/Unit/lit.cfg.py b/sycl/test/Unit/lit.cfg.py index 83c109d36a664..c82528252a164 100644 --- a/sycl/test/Unit/lit.cfg.py +++ b/sycl/test/Unit/lit.cfg.py @@ -22,7 +22,9 @@ config.test_source_root = config.test_exec_root # testFormat: The test format to use to interpret tests. -config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, test_suffix="Tests_non_preview") +config.test_format = lit.formats.GoogleTest( + config.llvm_build_mode, test_suffix="Tests_non_preview" +) # Workaround, as lit.formats.GoogleTest's ctor takes only single string as test suffix # and does not support a list of test suffixes. test_suffix_preview = "Tests_preview" From c8999d6cfff9058a12555dc096891690f2a61123 Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Tue, 4 Nov 2025 17:17:44 +0100 Subject: [PATCH 3/6] Update --- sycl/cmake/modules/AddSYCLUnitTest.cmake | 6 ++--- sycl/test/Unit/lit.cfg.py | 13 +--------- sycl/unittests/compression/CMakeLists.txt | 4 ++-- sycl/unittests/config/ConfigTests.cpp | 10 ++++---- .../kernel-and-program/CMakeLists.txt | 4 ++-- .../PersistentDeviceCodeCache.cpp | 24 +++++++++---------- sycl/unittests/pipes/CMakeLists.txt | 8 +++---- sycl/unittests/ur/CMakeLists.txt | 8 +++---- sycl/unittests/xpti_trace/CMakeLists.txt | 4 ++-- 9 files changed, 35 insertions(+), 46 deletions(-) diff --git a/sycl/cmake/modules/AddSYCLUnitTest.cmake b/sycl/cmake/modules/AddSYCLUnitTest.cmake index 2b4a10ea9f2a8..f6fe6c12be87b 100644 --- a/sycl/cmake/modules/AddSYCLUnitTest.cmake +++ b/sycl/cmake/modules/AddSYCLUnitTest.cmake @@ -157,8 +157,8 @@ endfunction() # # Will compile the list of files together to create two builds, with and without # the SYCL preview features enabled. -# Produces two binaries, named `basename(test_name_prefix_non_preview)` and `basename(test_name_prefix_preview)` +# Produces two binaries, named `basename(test_name_prefix_Non_Preview_Tests)` and `basename(test_name_prefix_Preview_Tests)` macro(add_sycl_unittest test_name_prefix link_variant) - add_sycl_unittest_internal(${test_name_prefix}_non_preview ${link_variant} FALSE ${ARGN}) - add_sycl_unittest_internal(${test_name_prefix}_preview ${link_variant} TRUE ${ARGN}) + add_sycl_unittest_internal(${test_name_prefix}_Non_Preview_Tests ${link_variant} FALSE ${ARGN}) + add_sycl_unittest_internal(${test_name_prefix}_Preview_Tests ${link_variant} TRUE ${ARGN}) endmacro() diff --git a/sycl/test/Unit/lit.cfg.py b/sycl/test/Unit/lit.cfg.py index c82528252a164..e2e95da2d95e6 100644 --- a/sycl/test/Unit/lit.cfg.py +++ b/sycl/test/Unit/lit.cfg.py @@ -5,7 +5,6 @@ import os import platform import subprocess -import sys import lit.formats import lit.util @@ -22,17 +21,7 @@ config.test_source_root = config.test_exec_root # testFormat: The test format to use to interpret tests. -config.test_format = lit.formats.GoogleTest( - config.llvm_build_mode, test_suffix="Tests_non_preview" -) -# Workaround, as lit.formats.GoogleTest's ctor takes only single string as test suffix -# and does not support a list of test suffixes. -test_suffix_preview = "Tests_preview" -kIsWindows = sys.platform in ["win32", "cygwin"] -if kIsWindows: - test_suffix_preview += ".exe" -config.test_format.test_suffixes.add(test_suffix_preview) -# End of workaround. +config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests") # Propagate the temp directory. Windows requires this because it uses \Windows\ # if none of these are present. diff --git a/sycl/unittests/compression/CMakeLists.txt b/sycl/unittests/compression/CMakeLists.txt index eb1edae8c51a3..cbd67bdb237d3 100644 --- a/sycl/unittests/compression/CMakeLists.txt +++ b/sycl/unittests/compression/CMakeLists.txt @@ -1,5 +1,5 @@ add_sycl_unittest(CompressionTests OBJECT CompressionTests.cpp ) -target_compile_definitions(CompressionTests_non_preview PRIVATE SYCL_RT_ZSTD_AVAILABLE) -target_compile_definitions(CompressionTests_preview PRIVATE SYCL_RT_ZSTD_AVAILABLE __INTEL_PREVIEW_BREAKING_CHANGES) +target_compile_definitions(CompressionTests_Non_Preview_Tests PRIVATE SYCL_RT_ZSTD_AVAILABLE) +target_compile_definitions(CompressionTests_Preview_Tests PRIVATE SYCL_RT_ZSTD_AVAILABLE __INTEL_PREVIEW_BREAKING_CHANGES) diff --git a/sycl/unittests/config/ConfigTests.cpp b/sycl/unittests/config/ConfigTests.cpp index 2391bb608a61e..382831b36846d 100644 --- a/sycl/unittests/config/ConfigTests.cpp +++ b/sycl/unittests/config/ConfigTests.cpp @@ -13,7 +13,7 @@ #include #include -TEST(ConfigTests, CheckConfigProcessing) { +TEST(ConfigTests, DISABLED_CheckConfigProcessing) { #ifdef _WIN32 _putenv_s("SYCL_CONFIG_FILE_NAME", "conf.txt"); #else @@ -244,7 +244,7 @@ TEST(ConfigTests, CheckConfigProcessing) { // not a valid number, the disk cache tracing will be enabled (depreciated // behavior). The default value is 0 and no tracing is enabled. using namespace sycl::detail; -TEST(ConfigTests, CheckSyclCacheTraceTest) { +TEST(ConfigTests, DISABLED_CheckSyclCacheTraceTest) { // Lambda to test parsing of SYCL_CACHE_TRACE auto TestConfig = [](int expectedValue, int expectedDiskCache, @@ -330,7 +330,7 @@ TEST(ConfigTests, CheckSyclCacheTraceTest) { // Cache eviction is performed when the cache size exceeds the threshold. // The thresholds are specified in bytes. // The default value is "0" which means that eviction is disabled. -TEST(ConfigTests, CheckSyclCacheEvictionThresholdTest) { +TEST(ConfigTests, DISABLED_CheckSyclCacheEvictionThresholdTest) { using InMemEvicType = sycl::detail::SYCLConfig; @@ -393,7 +393,7 @@ TEST(ConfigTests, CheckSyclCacheEvictionThresholdTest) { // Cache eviction is performed when the cache size exceeds the threshold. // The thresholds are specified in bytes. // The default value is "0" which means that eviction is disabled. -TEST(ConfigTests, CheckPersistentCacheEvictionThresholdTest) { +TEST(ConfigTests, DISABLED_CheckPersistentCacheEvictionThresholdTest) { using OnDiskEvicType = sycl::detail::SYCLConfig; @@ -451,7 +451,7 @@ TEST(ConfigTests, CheckPersistentCacheEvictionThresholdTest) { } // SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS accepts ... -TEST(ConfigTests, CheckParallelForRangeRoundingParams) { +TEST(ConfigTests, DISABLED_CheckParallelForRangeRoundingParams) { // Lambda to set SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS. auto SetRoundingParams = [](const char *value) { diff --git a/sycl/unittests/kernel-and-program/CMakeLists.txt b/sycl/unittests/kernel-and-program/CMakeLists.txt index 82d301509661b..bd2fb0279e19c 100644 --- a/sycl/unittests/kernel-and-program/CMakeLists.txt +++ b/sycl/unittests/kernel-and-program/CMakeLists.txt @@ -11,5 +11,5 @@ add_sycl_unittest(KernelAndProgramTests OBJECT KernelArgs.cpp KernelInfoShortcuts.cpp ) -target_compile_definitions(KernelAndProgramTests_non_preview PRIVATE __SYCL_INTERNAL_API) -target_compile_definitions(KernelAndProgramTests_preview PRIVATE __SYCL_INTERNAL_API __INTEL_PREVIEW_BREAKING_CHANGES) +target_compile_definitions(KernelAndProgramTests_Non_Preview_Tests PRIVATE __SYCL_INTERNAL_API) +target_compile_definitions(KernelAndProgramTests_Preview_Tests PRIVATE __SYCL_INTERNAL_API __INTEL_PREVIEW_BREAKING_CHANGES) diff --git a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp index 32e914086472a..2a6581c3cf0be 100644 --- a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp +++ b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp @@ -292,7 +292,7 @@ class PersistentDeviceCodeCache /* Checks that key values with \0 symbols are processed correctly */ -TEST_P(PersistentDeviceCodeCache, KeysWithNullTermSymbol) { +TEST_P(PersistentDeviceCodeCache, DISABLED_KeysWithNullTermSymbol) { std::string Key{'1', '\0', '3', '4', '\0'}; std::vector SpecConst(Key.begin(), Key.end()); std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( @@ -316,7 +316,7 @@ TEST_P(PersistentDeviceCodeCache, KeysWithNullTermSymbol) { ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(ItemDir)); } -TEST_P(PersistentDeviceCodeCache, MultipleImages) { +TEST_P(PersistentDeviceCodeCache, DISABLED_MultipleImages) { const char *ExtraEntryName = "ExtraEntry"; _sycl_offload_entry_struct ExtraEntryStruct = { /*addr*/ nullptr, const_cast(ExtraEntryName), @@ -381,21 +381,21 @@ TEST_P(PersistentDeviceCodeCache, MultipleImages) { /* Do read/write for the same cache item to/from 300 threads for small device * code size. Make sure that there is no data corruption or crashes. */ -TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteSmallItem) { +TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteSmallItem) { ConcurentReadWriteCache(0, 300); } /* Do read/write for the same cache item to/from 100 threads for medium device * code size. Make sure that there is no data corruption or crashes. */ -TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheMediumItem) { +TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheMediumItem) { ConcurentReadWriteCache(1, 100); } /* Do read/write for the same cache item to/from 20 threads from big device * code size. Make sure that there is no data corruption or crashes. */ -TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheBigItem) { +TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheBigItem) { ConcurentReadWriteCache(2, 20); } @@ -406,7 +406,7 @@ TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheBigItem) { * - source file is corrupted; * - binary file is corrupted. */ -TEST_P(PersistentDeviceCodeCache, CorruptedCacheFiles) { +TEST_P(PersistentDeviceCodeCache, DISABLED_CorruptedCacheFiles) { std::string BuildOptions{"--corrupted-file"}; std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( *getSyclObjImpl(Dev), {&Img}, {}, BuildOptions); @@ -491,7 +491,7 @@ TEST_P(PersistentDeviceCodeCache, CorruptedCacheFiles) { * - new cache item is created if existing one is locked on write operation; * - cache miss happens on read operation. */ -TEST_P(PersistentDeviceCodeCache, LockFile) { +TEST_P(PersistentDeviceCodeCache, DISABLED_LockFile) { std::string BuildOptions{"--obsolete-lock"}; std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( *getSyclObjImpl(Dev), {&Img}, {}, BuildOptions); @@ -541,7 +541,7 @@ TEST_P(PersistentDeviceCodeCache, LockFile) { // llvm::sys::fs::setPermissions does not make effect on Windows /* Checks cache behavior when filesystem read/write operations fail */ -TEST_P(PersistentDeviceCodeCache, AccessDeniedForCacheDir) { +TEST_P(PersistentDeviceCodeCache, DISABLED_AccessDeniedForCacheDir) { std::string BuildOptions{"--build-options"}; std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( *getSyclObjImpl(Dev), {&Img}, {}, BuildOptions); @@ -584,7 +584,7 @@ TEST_P(PersistentDeviceCodeCache, AccessDeniedForCacheDir) { #endif //_WIN32 // Unit tests for testing eviction in persistent cache. -TEST_P(PersistentDeviceCodeCache, BasicEviction) { +TEST_P(PersistentDeviceCodeCache, DISABLED_BasicEviction) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); @@ -646,7 +646,7 @@ TEST_P(PersistentDeviceCodeCache, BasicEviction) { } // Unit test for testing size file creation and update, concurrently. -TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheFileSize) { +TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheFileSize) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(CacheRoot)); @@ -659,7 +659,7 @@ TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheFileSize) { } // Unit test for adding and evicting cache, concurrently. -TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheEviction) { +TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheEviction) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(CacheRoot)); @@ -670,7 +670,7 @@ TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheEviction) { } // Unit test for ensuring that os_utils::getDirectorySize is thread-safe. -TEST_P(PersistentDeviceCodeCache, ConcurentDirectorySizeCalculation) { +TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentDirectorySizeCalculation) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(CacheRoot)); diff --git a/sycl/unittests/pipes/CMakeLists.txt b/sycl/unittests/pipes/CMakeLists.txt index 023d5bf0e79fa..bcf1ec3912a86 100644 --- a/sycl/unittests/pipes/CMakeLists.txt +++ b/sycl/unittests/pipes/CMakeLists.txt @@ -4,7 +4,7 @@ add_sycl_unittest(PipeTests OBJECT host_pipe_registration.cpp ) -add_dependencies(PipeTests_non_preview sycl) -target_include_directories(PipeTests_non_preview PRIVATE SYSTEM ${sycl_inc_dir}) -add_dependencies(PipeTests_preview sycl) -target_include_directories(PipeTests_preview PRIVATE SYSTEM ${sycl_inc_dir}) +add_dependencies(PipeTests_Non_Preview_Tests sycl) +target_include_directories(PipeTests_Non_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir}) +add_dependencies(PipeTests_Preview_Tests sycl) +target_include_directories(PipeTests_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir}) diff --git a/sycl/unittests/ur/CMakeLists.txt b/sycl/unittests/ur/CMakeLists.txt index ec1f8c523542a..12bb99d9f22cc 100644 --- a/sycl/unittests/ur/CMakeLists.txt +++ b/sycl/unittests/ur/CMakeLists.txt @@ -4,7 +4,7 @@ add_sycl_unittest(UrTests OBJECT UrUtility.cpp ) -add_dependencies(UrTests_non_preview sycl) -target_include_directories(UrTests_non_preview PRIVATE SYSTEM ${sycl_inc_dir}) -add_dependencies(UrTests_preview sycl) -target_include_directories(UrTests_preview PRIVATE SYSTEM ${sycl_inc_dir}) +add_dependencies(UrTests_Non_Preview_Tests sycl) +target_include_directories(UrTests_Non_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir}) +add_dependencies(UrTests_Preview_Tests sycl) +target_include_directories(UrTests_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir}) diff --git a/sycl/unittests/xpti_trace/CMakeLists.txt b/sycl/unittests/xpti_trace/CMakeLists.txt index 44574d36a9aa4..13921dd371cd0 100644 --- a/sycl/unittests/xpti_trace/CMakeLists.txt +++ b/sycl/unittests/xpti_trace/CMakeLists.txt @@ -6,5 +6,5 @@ add_sycl_unittest(XptiTraceTests OBJECT NodeCreation.cpp QueueIDCheck.cpp ) -target_link_libraries(XptiTraceTests_non_preview PRIVATE xpti xptitest_subscriber) -target_link_libraries(XptiTraceTests_preview PRIVATE xpti xptitest_subscriber) +target_link_libraries(XptiTraceTests_Non_Preview_Tests PRIVATE xpti xptitest_subscriber) +target_link_libraries(XptiTraceTests_Preview_Tests PRIVATE xpti xptitest_subscriber) From 8d543d761cdcdf16ecedfe3332a315bf13eb3066 Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Wed, 5 Nov 2025 16:05:56 +0100 Subject: [PATCH 4/6] Update --- sycl/test/Unit/lit.cfg.py | 7 +++++- sycl/unittests/config/ConfigTests.cpp | 10 ++++----- .../PersistentDeviceCodeCache.cpp | 22 +++++++++---------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/sycl/test/Unit/lit.cfg.py b/sycl/test/Unit/lit.cfg.py index e2e95da2d95e6..6aaf1125f15e3 100644 --- a/sycl/test/Unit/lit.cfg.py +++ b/sycl/test/Unit/lit.cfg.py @@ -21,7 +21,12 @@ config.test_source_root = config.test_exec_root # testFormat: The test format to use to interpret tests. -config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests") +# TODO: CMPLRTST-28093: currently only non-preview SYCL unit tests are executed +# as part of `check-sycl` and `check-all`. Change the second argument to just +# "Tests" after the concurrency problem with non-preview and preview versions of +# SYCL unit tests is fixed, so both non-review and preview versions of SYCL unit +# tests will be executed as part of `check-sycl` and `check-all`. +config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Non_Preview_Tests") # Propagate the temp directory. Windows requires this because it uses \Windows\ # if none of these are present. diff --git a/sycl/unittests/config/ConfigTests.cpp b/sycl/unittests/config/ConfigTests.cpp index 382831b36846d..2391bb608a61e 100644 --- a/sycl/unittests/config/ConfigTests.cpp +++ b/sycl/unittests/config/ConfigTests.cpp @@ -13,7 +13,7 @@ #include #include -TEST(ConfigTests, DISABLED_CheckConfigProcessing) { +TEST(ConfigTests, CheckConfigProcessing) { #ifdef _WIN32 _putenv_s("SYCL_CONFIG_FILE_NAME", "conf.txt"); #else @@ -244,7 +244,7 @@ TEST(ConfigTests, DISABLED_CheckConfigProcessing) { // not a valid number, the disk cache tracing will be enabled (depreciated // behavior). The default value is 0 and no tracing is enabled. using namespace sycl::detail; -TEST(ConfigTests, DISABLED_CheckSyclCacheTraceTest) { +TEST(ConfigTests, CheckSyclCacheTraceTest) { // Lambda to test parsing of SYCL_CACHE_TRACE auto TestConfig = [](int expectedValue, int expectedDiskCache, @@ -330,7 +330,7 @@ TEST(ConfigTests, DISABLED_CheckSyclCacheTraceTest) { // Cache eviction is performed when the cache size exceeds the threshold. // The thresholds are specified in bytes. // The default value is "0" which means that eviction is disabled. -TEST(ConfigTests, DISABLED_CheckSyclCacheEvictionThresholdTest) { +TEST(ConfigTests, CheckSyclCacheEvictionThresholdTest) { using InMemEvicType = sycl::detail::SYCLConfig; @@ -393,7 +393,7 @@ TEST(ConfigTests, DISABLED_CheckSyclCacheEvictionThresholdTest) { // Cache eviction is performed when the cache size exceeds the threshold. // The thresholds are specified in bytes. // The default value is "0" which means that eviction is disabled. -TEST(ConfigTests, DISABLED_CheckPersistentCacheEvictionThresholdTest) { +TEST(ConfigTests, CheckPersistentCacheEvictionThresholdTest) { using OnDiskEvicType = sycl::detail::SYCLConfig; @@ -451,7 +451,7 @@ TEST(ConfigTests, DISABLED_CheckPersistentCacheEvictionThresholdTest) { } // SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS accepts ... -TEST(ConfigTests, DISABLED_CheckParallelForRangeRoundingParams) { +TEST(ConfigTests, CheckParallelForRangeRoundingParams) { // Lambda to set SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS. auto SetRoundingParams = [](const char *value) { diff --git a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp index 2a6581c3cf0be..542fc9397267d 100644 --- a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp +++ b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp @@ -292,7 +292,7 @@ class PersistentDeviceCodeCache /* Checks that key values with \0 symbols are processed correctly */ -TEST_P(PersistentDeviceCodeCache, DISABLED_KeysWithNullTermSymbol) { +TEST_P(PersistentDeviceCodeCache, KeysWithNullTermSymbol) { std::string Key{'1', '\0', '3', '4', '\0'}; std::vector SpecConst(Key.begin(), Key.end()); std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( @@ -316,7 +316,7 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_KeysWithNullTermSymbol) { ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(ItemDir)); } -TEST_P(PersistentDeviceCodeCache, DISABLED_MultipleImages) { +TEST_P(PersistentDeviceCodeCache, MultipleImages) { const char *ExtraEntryName = "ExtraEntry"; _sycl_offload_entry_struct ExtraEntryStruct = { /*addr*/ nullptr, const_cast(ExtraEntryName), @@ -381,21 +381,21 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_MultipleImages) { /* Do read/write for the same cache item to/from 300 threads for small device * code size. Make sure that there is no data corruption or crashes. */ -TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteSmallItem) { +TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteSmallItem) { ConcurentReadWriteCache(0, 300); } /* Do read/write for the same cache item to/from 100 threads for medium device * code size. Make sure that there is no data corruption or crashes. */ -TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheMediumItem) { +TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheMediumItem) { ConcurentReadWriteCache(1, 100); } /* Do read/write for the same cache item to/from 20 threads from big device * code size. Make sure that there is no data corruption or crashes. */ -TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheBigItem) { +TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheBigItem) { ConcurentReadWriteCache(2, 20); } @@ -406,7 +406,7 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheBigItem) { * - source file is corrupted; * - binary file is corrupted. */ -TEST_P(PersistentDeviceCodeCache, DISABLED_CorruptedCacheFiles) { +TEST_P(PersistentDeviceCodeCache, CorruptedCacheFiles) { std::string BuildOptions{"--corrupted-file"}; std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( *getSyclObjImpl(Dev), {&Img}, {}, BuildOptions); @@ -491,7 +491,7 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_CorruptedCacheFiles) { * - new cache item is created if existing one is locked on write operation; * - cache miss happens on read operation. */ -TEST_P(PersistentDeviceCodeCache, DISABLED_LockFile) { +TEST_P(PersistentDeviceCodeCache, LockFile) { std::string BuildOptions{"--obsolete-lock"}; std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( *getSyclObjImpl(Dev), {&Img}, {}, BuildOptions); @@ -541,7 +541,7 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_LockFile) { // llvm::sys::fs::setPermissions does not make effect on Windows /* Checks cache behavior when filesystem read/write operations fail */ -TEST_P(PersistentDeviceCodeCache, DISABLED_AccessDeniedForCacheDir) { +TEST_P(PersistentDeviceCodeCache, AccessDeniedForCacheDir) { std::string BuildOptions{"--build-options"}; std::string ItemDir = detail::PersistentDeviceCodeCache::getCacheItemPath( *getSyclObjImpl(Dev), {&Img}, {}, BuildOptions); @@ -646,7 +646,7 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_BasicEviction) { } // Unit test for testing size file creation and update, concurrently. -TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheFileSize) { +TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheFileSize) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(CacheRoot)); @@ -659,7 +659,7 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheFileSize) { } // Unit test for adding and evicting cache, concurrently. -TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheEviction) { +TEST_P(PersistentDeviceCodeCache, ConcurentReadWriteCacheEviction) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(CacheRoot)); @@ -670,7 +670,7 @@ TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentReadWriteCacheEviction) { } // Unit test for ensuring that os_utils::getDirectorySize is thread-safe. -TEST_P(PersistentDeviceCodeCache, DISABLED_ConcurentDirectorySizeCalculation) { +TEST_P(PersistentDeviceCodeCache, ConcurentDirectorySizeCalculation) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); ASSERT_NO_ERROR(llvm::sys::fs::remove_directories(CacheRoot)); From 69b477589616ea791f6c260008c2eafa77ac55f9 Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Wed, 5 Nov 2025 16:08:30 +0100 Subject: [PATCH 5/6] Update --- sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp index 542fc9397267d..32e914086472a 100644 --- a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp +++ b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp @@ -584,7 +584,7 @@ TEST_P(PersistentDeviceCodeCache, AccessDeniedForCacheDir) { #endif //_WIN32 // Unit tests for testing eviction in persistent cache. -TEST_P(PersistentDeviceCodeCache, DISABLED_BasicEviction) { +TEST_P(PersistentDeviceCodeCache, BasicEviction) { // Cleanup the cache directory. std::string CacheRoot = detail::PersistentDeviceCodeCache::getRootDir(); From 02ae68a0bd367cd01df2aff386d3abc9bc00a366 Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Wed, 5 Nov 2025 17:29:59 +0100 Subject: [PATCH 6/6] Update --- sycl/cmake/modules/AddSYCLUnitTest.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sycl/cmake/modules/AddSYCLUnitTest.cmake b/sycl/cmake/modules/AddSYCLUnitTest.cmake index f6fe6c12be87b..0b7a820452004 100644 --- a/sycl/cmake/modules/AddSYCLUnitTest.cmake +++ b/sycl/cmake/modules/AddSYCLUnitTest.cmake @@ -158,6 +158,9 @@ endfunction() # Will compile the list of files together to create two builds, with and without # the SYCL preview features enabled. # Produces two binaries, named `basename(test_name_prefix_Non_Preview_Tests)` and `basename(test_name_prefix_Preview_Tests)` +# Note: in case of changing test names below, please also adjust the test suffix +# in sycl/test/Unit/lit.cfg.py in the line which looks like this: +# `config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, <...>)` macro(add_sycl_unittest test_name_prefix link_variant) add_sycl_unittest_internal(${test_name_prefix}_Non_Preview_Tests ${link_variant} FALSE ${ARGN}) add_sycl_unittest_internal(${test_name_prefix}_Preview_Tests ${link_variant} TRUE ${ARGN})