From db0c809d6bb7584ce8520b3201729b2a4ace9185 Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Wed, 15 Oct 2025 13:21:18 +0000 Subject: [PATCH 01/15] CID-2425741, 2425714 dereference potentially null ptr Signed-off-by: Pawel Raasz --- src/inference/src/dev/plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inference/src/dev/plugin.cpp b/src/inference/src/dev/plugin.cpp index 0bc133d153fdd6..9d771870979bac 100644 --- a/src/inference/src/dev/plugin.cpp +++ b/src/inference/src/dev/plugin.cpp @@ -45,7 +45,7 @@ const ov::Version ov::Plugin::get_version() const { } void ov::Plugin::set_property(const ov::AnyMap& config) { - m_ptr->set_property(config); + OV_PLUGIN_CALL_STATEMENT(m_ptr->set_property(config)); } ov::SoPtr ov::Plugin::compile_model(const std::shared_ptr& model, @@ -108,7 +108,7 @@ ov::SoPtr ov::Plugin::get_default_context(const AnyMap& para } ov::Any ov::Plugin::get_property(const std::string& name, const AnyMap& arguments) const { - return {m_ptr->get_property(name, arguments), {m_so}}; + OV_PLUGIN_CALL_STATEMENT(return {m_ptr->get_property(name, arguments), {m_so}}); } bool ov::Plugin::supports_model_caching(const ov::AnyMap& arguments) const { From 1d279d6cc9c8bf22fc9a58f9c79ae2df7f635526 Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Thu, 16 Oct 2025 09:34:51 +0000 Subject: [PATCH 02/15] CID-2425706 Dereference null field Signed-off-by: Pawel Raasz --- src/core/src/runtime/allocator.cpp | 2 +- src/core/tests/ov_default_allocator_test.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/core/src/runtime/allocator.cpp b/src/core/src/runtime/allocator.cpp index b119ad4882291e..f1d498f0605fde 100644 --- a/src/core/src/runtime/allocator.cpp +++ b/src/core/src/runtime/allocator.cpp @@ -86,7 +86,7 @@ bool Allocator::operator==(const Allocator& other) const { if (_impl == other._impl) { return true; } - return _impl->is_equal(*other._impl); + return other._impl && other._impl && _impl->is_equal(*other._impl); }); } diff --git a/src/core/tests/ov_default_allocator_test.cpp b/src/core/tests/ov_default_allocator_test.cpp index 81fa65186ff08a..bd5a8f6cdc4297 100644 --- a/src/core/tests/ov_default_allocator_test.cpp +++ b/src/core/tests/ov_default_allocator_test.cpp @@ -10,6 +10,8 @@ #include "openvino/core/except.hpp" #include "openvino/runtime/allocator.hpp" +namespace ov::test { +using ::testing::_; using OVDefaultAllocatorTest = ::testing::Test; TEST_F(OVDefaultAllocatorTest, notThrowOnZeroSize) { @@ -59,3 +61,12 @@ TEST_F(OVDefaultAllocatorTest, canAllocate10KMemory) { EXPECT_EQ(ptr[9999], 11); allocator.deallocate(handle); } + +TEST_F(OVDefaultAllocatorTest, compareIfImplIsNull) { + auto a1 = ov::Allocator(); + auto a2 = std::move(a1); + + EXPECT_FALSE(a2 == a1); + OV_EXPECT_THROW(std::ignore = (a1 == a2), ov::Exception, _); +} +} // namespace ov::test From e7a520e2920f294766c5b8470061e42ca51fd2f8 Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Thu, 16 Oct 2025 11:54:28 +0200 Subject: [PATCH 03/15] Update src/core/src/runtime/allocator.cpp Co-authored-by: Tomasz Jankowski --- src/core/src/runtime/allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/src/runtime/allocator.cpp b/src/core/src/runtime/allocator.cpp index f1d498f0605fde..0676e9ab58fc37 100644 --- a/src/core/src/runtime/allocator.cpp +++ b/src/core/src/runtime/allocator.cpp @@ -86,7 +86,7 @@ bool Allocator::operator==(const Allocator& other) const { if (_impl == other._impl) { return true; } - return other._impl && other._impl && _impl->is_equal(*other._impl); + return other._impl && _impl->is_equal(*other._impl); }); } From ad25eb6cb9d95561d4bffd88aca036990b475dd3 Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Fri, 17 Oct 2025 12:22:09 +0000 Subject: [PATCH 04/15] Fix using mock plugin in tests Mock plugin requires have implementation to not throw exception which are catch by ov::Plugin Signed-off-by: Pawel Raasz --- .../tests/functional/caching_test.cpp | 4 +--- .../tests/functional/ov_core_test.cpp | 3 +++ .../tests/functional/ov_core_threading.cpp | 5 +++++ .../functional/ov_register_plugin_test.cpp | 2 ++ .../include/common_test_utils/file_utils.hpp | 1 - .../mocks/mock_engine/mock_plugin.cpp | 5 ++--- .../mocks/openvino/runtime/mock_iplugin.hpp | 20 +++++++++++++++++++ 7 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/inference/tests/functional/caching_test.cpp b/src/inference/tests/functional/caching_test.cpp index 4e48df837bef17..de690002a7de64 100644 --- a/src/inference/tests/functional/caching_test.cpp +++ b/src/inference/tests/functional/caching_test.cpp @@ -444,9 +444,7 @@ class CachingTest : public ::testing::TestWithParam::file_separator + xml_file_name; create_plugin_xml(cwd_file_path); create_plugin_xml(ov_file_path, "2"); + ov::test::utils::MockIPluginInjector mock{}; + mock.inject_plugin(); ov::Core core(xml_file_name); auto version = core.get_versions("2"); EXPECT_EQ(1, version.size()); diff --git a/src/inference/tests/functional/ov_core_threading.cpp b/src/inference/tests/functional/ov_core_threading.cpp index ef7eedf65f0490..c23f8e80c48b7a 100644 --- a/src/inference/tests/functional/ov_core_threading.cpp +++ b/src/inference/tests/functional/ov_core_threading.cpp @@ -17,6 +17,7 @@ #include "openvino/core/so_extension.hpp" #include "openvino/runtime/core.hpp" #include "openvino/util/file_util.hpp" +#include "unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp" #ifdef __GLIBC__ # include @@ -92,8 +93,10 @@ TEST_F(CoreThreadingTests, RegisterPlugin) { std::atomic index{0}; auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), std::string("mock_engine") + OV_BUILD_POSTFIX); + ov::test::utils::MockIPluginInjector mock{}; runParallel( [&]() { + mock.inject_plugin(); const std::string deviceName = std::to_string(index++); core.register_plugin(plugin_path, deviceName); core.get_versions(deviceName); @@ -130,8 +133,10 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { return std::tie(pluginsXML, indexStr); }; + ov::test::utils::MockIPluginInjector mock{}; runParallel( [&]() { + mock.inject_plugin(); const auto& [fileName, deviceName] = getPluginXml(); core.register_plugins(fileName.string()); core.get_versions(deviceName); diff --git a/src/inference/tests/functional/ov_register_plugin_test.cpp b/src/inference/tests/functional/ov_register_plugin_test.cpp index c042a0d4460bc5..a3d3e205f63345 100644 --- a/src/inference/tests/functional/ov_register_plugin_test.cpp +++ b/src/inference/tests/functional/ov_register_plugin_test.cpp @@ -211,6 +211,8 @@ TEST(RegisterPluginTests, registerPluginsXMLUnicodePath) { GTEST_COUT << "Test " << testIndex << std::endl; ov::Core core; + ov::test::utils::MockIPluginInjector mock{}; + mock.inject_plugin(); GTEST_COUT << "Core created " << testIndex << std::endl; OV_ASSERT_NO_THROW(core.register_plugins(::ov::util::wstring_to_string(pluginsXmlW))); diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp index 49e577adb2dca8..d4290aabc61205 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp @@ -206,7 +206,6 @@ class MockPlugin : public ov::IPlugin { if (it.first == ov::num_streams.name()) num_streams = it.second.as(); } - OPENVINO_NOT_IMPLEMENTED; } ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const override { diff --git a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp index fa27397156fa10..5ae7096eece322 100644 --- a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp +++ b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp @@ -19,7 +19,7 @@ class MockInternalPlugin : public ov::IPlugin { ov::IPlugin* m_plugin = nullptr; - ov::AnyMap config; + ov::AnyMap config{}; public: explicit MockInternalPlugin(ov::IPlugin* target) : m_plugin(target) {} @@ -203,10 +203,9 @@ std::mutex targets_mutex; OPENVINO_PLUGIN_API void create_plugin_engine(std::shared_ptr& plugin) { std::shared_ptr internal_plugin; - if (targets.empty()) { + if (std::lock_guard lock(targets_mutex); targets.empty()) { internal_plugin = std::make_shared(); } else { - std::lock_guard lock(targets_mutex); internal_plugin = targets.front(); targets.pop(); } diff --git a/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp b/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp index c2bae9e3a6884f..d5b8369f5e21be 100644 --- a/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp +++ b/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp @@ -9,6 +9,7 @@ #include #include +#include "common_test_utils/file_utils.hpp" #include "openvino/core/any.hpp" #include "openvino/core/model.hpp" #include "openvino/core/version.hpp" @@ -51,4 +52,23 @@ class MockIPlugin : public ov::IPlugin { (const)); }; +namespace test::utils { +template +struct MockIPluginInjector { + template + MockIPluginInjector(Args&&... args) + : m_so{ov::util::load_shared_object(get_mock_engine_path().c_str())}, + m_plugin_impl{std::make_unique(std::forward(args)...)} {} + + void inject_plugin() const { + const auto inject = make_std_function(m_so, "InjectPlugin"); + inject(m_plugin_impl.get()); + } + +private: + std::shared_ptr m_so; + std::unique_ptr m_plugin_impl; +}; +} // namespace test::utils + } // namespace ov From d2854338035f1dec7a2030ddb6128c604b46e16b Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Fri, 17 Oct 2025 15:28:42 +0000 Subject: [PATCH 05/15] Update MockPlugin to support set/get property without impl injection Signed-off-by: Pawel Raasz --- .../tests/functional/ov_core_test.cpp | 2 -- .../tests/functional/ov_core_threading.cpp | 5 +---- .../functional/ov_register_plugin_test.cpp | 2 -- .../mocks/mock_engine/mock_plugin.cpp | 2 +- .../mocks/openvino/runtime/mock_iplugin.hpp | 21 ------------------- 5 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/inference/tests/functional/ov_core_test.cpp b/src/inference/tests/functional/ov_core_test.cpp index fa2b629d1c7aa4..d32121e3aa1d24 100644 --- a/src/inference/tests/functional/ov_core_test.cpp +++ b/src/inference/tests/functional/ov_core_test.cpp @@ -128,8 +128,6 @@ TEST_F(CoreBaseTest, LoadOVFolderOverCWPathPluginXML) { ov::test::utils::getOpenvinoLibDirectory() + ov::util::FileTraits::file_separator + xml_file_name; create_plugin_xml(cwd_file_path); create_plugin_xml(ov_file_path, "2"); - ov::test::utils::MockIPluginInjector mock{}; - mock.inject_plugin(); ov::Core core(xml_file_name); auto version = core.get_versions("2"); EXPECT_EQ(1, version.size()); diff --git a/src/inference/tests/functional/ov_core_threading.cpp b/src/inference/tests/functional/ov_core_threading.cpp index c23f8e80c48b7a..fc61af1231eb2e 100644 --- a/src/inference/tests/functional/ov_core_threading.cpp +++ b/src/inference/tests/functional/ov_core_threading.cpp @@ -93,10 +93,9 @@ TEST_F(CoreThreadingTests, RegisterPlugin) { std::atomic index{0}; auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), std::string("mock_engine") + OV_BUILD_POSTFIX); - ov::test::utils::MockIPluginInjector mock{}; runParallel( [&]() { - mock.inject_plugin(); + // mock.inject_plugin(); const std::string deviceName = std::to_string(index++); core.register_plugin(plugin_path, deviceName); core.get_versions(deviceName); @@ -133,10 +132,8 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { return std::tie(pluginsXML, indexStr); }; - ov::test::utils::MockIPluginInjector mock{}; runParallel( [&]() { - mock.inject_plugin(); const auto& [fileName, deviceName] = getPluginXml(); core.register_plugins(fileName.string()); core.get_versions(deviceName); diff --git a/src/inference/tests/functional/ov_register_plugin_test.cpp b/src/inference/tests/functional/ov_register_plugin_test.cpp index a3d3e205f63345..c042a0d4460bc5 100644 --- a/src/inference/tests/functional/ov_register_plugin_test.cpp +++ b/src/inference/tests/functional/ov_register_plugin_test.cpp @@ -211,8 +211,6 @@ TEST(RegisterPluginTests, registerPluginsXMLUnicodePath) { GTEST_COUT << "Test " << testIndex << std::endl; ov::Core core; - ov::test::utils::MockIPluginInjector mock{}; - mock.inject_plugin(); GTEST_COUT << "Core created " << testIndex << std::endl; OV_ASSERT_NO_THROW(core.register_plugins(::ov::util::wstring_to_string(pluginsXmlW))); diff --git a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp index 5ae7096eece322..73e9aa2f494b40 100644 --- a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp +++ b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp @@ -57,7 +57,7 @@ class MockInternalPlugin : public ov::IPlugin { ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const override { if (m_plugin) return m_plugin->get_property(name, arguments); - OPENVINO_NOT_IMPLEMENTED; + return ""; } ov::SoPtr create_context(const ov::AnyMap& remote_properties) const override { diff --git a/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp b/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp index d5b8369f5e21be..a2251415698f32 100644 --- a/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp +++ b/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp @@ -9,7 +9,6 @@ #include #include -#include "common_test_utils/file_utils.hpp" #include "openvino/core/any.hpp" #include "openvino/core/model.hpp" #include "openvino/core/version.hpp" @@ -51,24 +50,4 @@ class MockIPlugin : public ov::IPlugin { (const std::shared_ptr&, const ov::AnyMap&), (const)); }; - -namespace test::utils { -template -struct MockIPluginInjector { - template - MockIPluginInjector(Args&&... args) - : m_so{ov::util::load_shared_object(get_mock_engine_path().c_str())}, - m_plugin_impl{std::make_unique(std::forward(args)...)} {} - - void inject_plugin() const { - const auto inject = make_std_function(m_so, "InjectPlugin"); - inject(m_plugin_impl.get()); - } - -private: - std::shared_ptr m_so; - std::unique_ptr m_plugin_impl; -}; -} // namespace test::utils - } // namespace ov From 6577bea4c46f8a8c6da87a3cfdcf9359f77c7caf Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Sun, 19 Oct 2025 19:18:00 +0000 Subject: [PATCH 06/15] Revert not required changes Signed-off-by: Pawel Raasz --- src/inference/tests/functional/ov_core_test.cpp | 1 - src/inference/tests/functional/ov_core_threading.cpp | 2 -- .../common_test_utils/include/common_test_utils/file_utils.hpp | 1 + .../unit_test_utils/mocks/mock_engine/mock_plugin.cpp | 3 ++- .../unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp | 1 + 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inference/tests/functional/ov_core_test.cpp b/src/inference/tests/functional/ov_core_test.cpp index d32121e3aa1d24..8a1f856de209cf 100644 --- a/src/inference/tests/functional/ov_core_test.cpp +++ b/src/inference/tests/functional/ov_core_test.cpp @@ -12,7 +12,6 @@ #include "functional_test_utils/test_model/test_model.hpp" #include "openvino/runtime/core.hpp" #include "openvino/util/file_util.hpp" -#include "unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp" class CoreBaseTest : public testing::Test { protected: diff --git a/src/inference/tests/functional/ov_core_threading.cpp b/src/inference/tests/functional/ov_core_threading.cpp index fc61af1231eb2e..ef7eedf65f0490 100644 --- a/src/inference/tests/functional/ov_core_threading.cpp +++ b/src/inference/tests/functional/ov_core_threading.cpp @@ -17,7 +17,6 @@ #include "openvino/core/so_extension.hpp" #include "openvino/runtime/core.hpp" #include "openvino/util/file_util.hpp" -#include "unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp" #ifdef __GLIBC__ # include @@ -95,7 +94,6 @@ TEST_F(CoreThreadingTests, RegisterPlugin) { std::string("mock_engine") + OV_BUILD_POSTFIX); runParallel( [&]() { - // mock.inject_plugin(); const std::string deviceName = std::to_string(index++); core.register_plugin(plugin_path, deviceName); core.get_versions(deviceName); diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp index d4290aabc61205..49e577adb2dca8 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp @@ -206,6 +206,7 @@ class MockPlugin : public ov::IPlugin { if (it.first == ov::num_streams.name()) num_streams = it.second.as(); } + OPENVINO_NOT_IMPLEMENTED; } ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const override { diff --git a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp index 73e9aa2f494b40..a419dc78630b6e 100644 --- a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp +++ b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp @@ -203,9 +203,10 @@ std::mutex targets_mutex; OPENVINO_PLUGIN_API void create_plugin_engine(std::shared_ptr& plugin) { std::shared_ptr internal_plugin; - if (std::lock_guard lock(targets_mutex); targets.empty()) { + if (targets.empty()) { internal_plugin = std::make_shared(); } else { + std::lock_guard lock(targets_mutex); internal_plugin = targets.front(); targets.pop(); } diff --git a/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp b/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp index a2251415698f32..c2bae9e3a6884f 100644 --- a/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp +++ b/src/tests/test_utils/unit_test_utils/mocks/openvino/runtime/mock_iplugin.hpp @@ -50,4 +50,5 @@ class MockIPlugin : public ov::IPlugin { (const std::shared_ptr&, const ov::AnyMap&), (const)); }; + } // namespace ov From 9a58dcd50ec134703ae01f982f4643a26096f2a5 Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Sun, 19 Oct 2025 20:16:37 +0000 Subject: [PATCH 07/15] ov::test::mock::plugin not throw on set_property Signed-off-by: Pawel Raasz --- .../common_test_utils/include/common_test_utils/file_utils.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp index 49e577adb2dca8..d4290aabc61205 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp @@ -206,7 +206,6 @@ class MockPlugin : public ov::IPlugin { if (it.first == ov::num_streams.name()) num_streams = it.second.as(); } - OPENVINO_NOT_IMPLEMENTED; } ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const override { From 7681c6103b563ed239aef1f0bf2098929829242f Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Mon, 20 Oct 2025 10:08:15 +0000 Subject: [PATCH 08/15] Try fix RegisterPlugin test Signed-off-by: Pawel Raasz --- src/inference/tests/functional/ov_core_threading.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/inference/tests/functional/ov_core_threading.cpp b/src/inference/tests/functional/ov_core_threading.cpp index ef7eedf65f0490..b6ccf5f7ba6fea 100644 --- a/src/inference/tests/functional/ov_core_threading.cpp +++ b/src/inference/tests/functional/ov_core_threading.cpp @@ -90,16 +90,16 @@ TEST_F(CoreThreadingTests, SetConfigPluginDoesNotExist) { TEST_F(CoreThreadingTests, RegisterPlugin) { ov::Core core; std::atomic index{0}; - auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), - std::string("mock_engine") + OV_BUILD_POSTFIX); + const auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), + std::string("mock_engine") + OV_BUILD_POSTFIX); runParallel( - [&]() { - const std::string deviceName = std::to_string(index++); - core.register_plugin(plugin_path, deviceName); + [path = plugin_path, &core, &index]() { + const auto deviceName = std::to_string(index++); + core.register_plugin(path, deviceName); core.get_versions(deviceName); core.unload_plugin(deviceName); }, - 4000); + 10); } // tested function: RegisterPlugins From a55a367084771ecd87c8e61a80ab361f639f58d8 Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Mon, 20 Oct 2025 12:32:20 +0000 Subject: [PATCH 09/15] Try Fix RegisterPlugins test Signed-off-by: Pawel Raasz --- .../tests/functional/ov_core_threading.cpp | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/inference/tests/functional/ov_core_threading.cpp b/src/inference/tests/functional/ov_core_threading.cpp index b6ccf5f7ba6fea..ec3123bdb3bd77 100644 --- a/src/inference/tests/functional/ov_core_threading.cpp +++ b/src/inference/tests/functional/ov_core_threading.cpp @@ -99,7 +99,7 @@ TEST_F(CoreThreadingTests, RegisterPlugin) { core.get_versions(deviceName); core.unload_plugin(deviceName); }, - 10); + 4000); } // tested function: RegisterPlugins @@ -110,28 +110,29 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { # endif ov::Core core; std::atomic index{0}; - auto file_prefix = ov::test::utils::generateTestFilePrefix(); - auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), - std::string("mock_engine") + OV_BUILD_POSTFIX); + const auto file_prefix = ov::test::utils::generateTestFilePrefix(); + const auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), + std::string("mock_engine") + OV_BUILD_POSTFIX); - auto getPluginXml = [&]() -> std::tuple { - std::string indexStr = std::to_string(index++); - std::filesystem::path pluginsXML = file_prefix + indexStr + ".xml"; + auto getPluginXml = + [path = plugin_path, prefix = file_prefix, &index]() -> std::tuple { + const auto indexStr = std::to_string(index++); + std::filesystem::path pluginsXML = prefix + indexStr + ".xml"; std::ofstream file(pluginsXML); file << ""; file.flush(); file.close(); - return std::tie(pluginsXML, indexStr); + return std::make_tuple(pluginsXML, indexStr); }; runParallel( - [&]() { + [&getPluginXml, &core]() { const auto& [fileName, deviceName] = getPluginXml(); core.register_plugins(fileName.string()); core.get_versions(deviceName); From f35e22d6d5f9f37d89ea545eae5a7a3eab179d9e Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Wed, 22 Oct 2025 12:00:09 +0000 Subject: [PATCH 10/15] Use mutex when iterate over pluginRegistry Signed-off-by: Pawel Raasz --- src/inference/src/dev/core_impl.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cpp index 86843b71c79fcc..784ef2bebad0e2 100644 --- a/src/inference/src/dev/core_impl.cpp +++ b/src/inference/src/dev/core_impl.cpp @@ -783,11 +783,15 @@ ov::Plugin ov::CoreImpl::get_plugin(const std::string& pluginName) const { // here we can store values like GPU.0, GPU.1 and we need to set properties to plugin // for each such .0, .1, .# device to make sure plugin can handle different settings for different // device IDs - for (auto pluginDesc : pluginRegistry) { - ov::DeviceIDParser parser(pluginDesc.first); - if (pluginDesc.first.find(deviceName) != std::string::npos && !parser.get_device_id().empty()) { - pluginDesc.second.defaultConfig[deviceKey] = parser.get_device_id(); - plugin.set_property(pluginDesc.second.defaultConfig); + { + std::lock_guard g_lock(get_mutex()); + for (auto pluginDesc : pluginRegistry) { + ov::DeviceIDParser parser(pluginDesc.first); + if (pluginDesc.first.find(deviceName) != std::string::npos && + !parser.get_device_id().empty()) { + pluginDesc.second.defaultConfig[deviceKey] = parser.get_device_id(); + plugin.set_property(pluginDesc.second.defaultConfig); + } } } } From 6c913da1f1573275c95b51ac2083b666e0705c34 Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Wed, 22 Oct 2025 14:33:18 +0000 Subject: [PATCH 11/15] Fix set property for proxy plugin Signed-off-by: Pawel Raasz --- src/inference/src/dev/core_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cpp index 784ef2bebad0e2..edc023823c6b54 100644 --- a/src/inference/src/dev/core_impl.cpp +++ b/src/inference/src/dev/core_impl.cpp @@ -784,11 +784,12 @@ ov::Plugin ov::CoreImpl::get_plugin(const std::string& pluginName) const { // for each such .0, .1, .# device to make sure plugin can handle different settings for different // device IDs { - std::lock_guard g_lock(get_mutex()); + std::unique_lock g_lock(get_mutex()); for (auto pluginDesc : pluginRegistry) { ov::DeviceIDParser parser(pluginDesc.first); if (pluginDesc.first.find(deviceName) != std::string::npos && !parser.get_device_id().empty()) { + g_lock.unlock(); pluginDesc.second.defaultConfig[deviceKey] = parser.get_device_id(); plugin.set_property(pluginDesc.second.defaultConfig); } From 5367e47475580f90a92e1825d30933df4a9696fa Mon Sep 17 00:00:00 2001 From: Pawel Raasz Date: Thu, 23 Oct 2025 05:16:18 +0000 Subject: [PATCH 12/15] Revert test changes in core threading changes Signed-off-by: Pawel Raasz --- .../tests/functional/ov_core_threading.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/inference/tests/functional/ov_core_threading.cpp b/src/inference/tests/functional/ov_core_threading.cpp index ec3123bdb3bd77..9d4ebe3efed1ca 100644 --- a/src/inference/tests/functional/ov_core_threading.cpp +++ b/src/inference/tests/functional/ov_core_threading.cpp @@ -93,9 +93,9 @@ TEST_F(CoreThreadingTests, RegisterPlugin) { const auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), std::string("mock_engine") + OV_BUILD_POSTFIX); runParallel( - [path = plugin_path, &core, &index]() { + [&]() { const auto deviceName = std::to_string(index++); - core.register_plugin(path, deviceName); + core.register_plugin(plugin_path, deviceName); core.get_versions(deviceName); core.unload_plugin(deviceName); }, @@ -114,14 +114,13 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { const auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), std::string("mock_engine") + OV_BUILD_POSTFIX); - auto getPluginXml = - [path = plugin_path, prefix = file_prefix, &index]() -> std::tuple { + auto getPluginXml = [&]() -> std::tuple { const auto indexStr = std::to_string(index++); - std::filesystem::path pluginsXML = prefix + indexStr + ".xml"; + std::filesystem::path pluginsXML = file_prefix + indexStr + ".xml"; std::ofstream file(pluginsXML); file << ""; @@ -132,7 +131,7 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { }; runParallel( - [&getPluginXml, &core]() { + [&]() { const auto& [fileName, deviceName] = getPluginXml(); core.register_plugins(fileName.string()); core.get_versions(deviceName); From 00b55ba26cc37d1c6789ecac52d901fdae433c01 Mon Sep 17 00:00:00 2001 From: "Raasz, Pawel" Date: Fri, 24 Oct 2025 13:41:42 +0200 Subject: [PATCH 13/15] Change timeout for unit test for Win (Debug) - test job cancelled on different test case Signed-off-by: Raasz, Pawel --- .../src/utils/graph_serializer/serializer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp b/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp index 114991ec59ea78..7c6742878b21eb 100644 --- a/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp +++ b/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp @@ -54,6 +54,20 @@ class WeightlessWriter : public util::ConstantWriter { } private: + // + bool append_rt_attribute(pugi::xml_node& node, const ov::RuntimeAttribute& attribute) override { + // + if (auto wl_attr = ov::as_type(&attribute)) { + // + const auto& type_info = attribute.get_type_info(); + // + node.append_attribute("name").set_value(type_info.name); + // + node.append_attribute("version").set_value(type_info.get_version().c_str()); + // + node.append_attribute("type").set_value(ov::util::get_ir_precision_name(wl_attr->original_dtype)); + // + node.append_attribute("offset").set_value(wl_attr->bin_offset); + // + node.append_attribute("size").set_value(wl_attr->original_size); + // + return true; + // + } else { + // + return ov::util::XmlSerializer::append_rt_attribute(node, attribute); + // + } + // + } + WeightlessWriter::FilePosition m_offset; bool m_skip_weights = false; }; From 2af348ae15ec977626b54e7bddc5fbc0445bfad8 Mon Sep 17 00:00:00 2001 From: "Raasz, Pawel" Date: Fri, 24 Oct 2025 14:45:45 +0200 Subject: [PATCH 14/15] Remove commented code Signed-off-by: Raasz, Pawel --- .../src/utils/graph_serializer/serializer.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp b/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp index 7c6742878b21eb..114991ec59ea78 100644 --- a/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp +++ b/src/plugins/intel_cpu/src/utils/graph_serializer/serializer.cpp @@ -54,20 +54,6 @@ class WeightlessWriter : public util::ConstantWriter { } private: - // + bool append_rt_attribute(pugi::xml_node& node, const ov::RuntimeAttribute& attribute) override { - // + if (auto wl_attr = ov::as_type(&attribute)) { - // + const auto& type_info = attribute.get_type_info(); - // + node.append_attribute("name").set_value(type_info.name); - // + node.append_attribute("version").set_value(type_info.get_version().c_str()); - // + node.append_attribute("type").set_value(ov::util::get_ir_precision_name(wl_attr->original_dtype)); - // + node.append_attribute("offset").set_value(wl_attr->bin_offset); - // + node.append_attribute("size").set_value(wl_attr->original_size); - // + return true; - // + } else { - // + return ov::util::XmlSerializer::append_rt_attribute(node, attribute); - // + } - // + } - WeightlessWriter::FilePosition m_offset; bool m_skip_weights = false; }; From 635887e5f67b61e395079ad8afc4b9d9830217aa Mon Sep 17 00:00:00 2001 From: "Raasz, Pawel" Date: Fri, 24 Oct 2025 17:49:00 +0200 Subject: [PATCH 15/15] Update vs2022_debug unit tests timeout Signed-off-by: Raasz, Pawel --- .github/workflows/windows_vs2022_debug.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows_vs2022_debug.yml b/.github/workflows/windows_vs2022_debug.yml index 8e7aafc9333eda..a7b7d2c3913092 100644 --- a/.github/workflows/windows_vs2022_debug.yml +++ b/.github/workflows/windows_vs2022_debug.yml @@ -48,7 +48,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} skip_when_only_listed_labels_set: 'docs' skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*' - + - name: Get target branch id: set_target_branch run: | @@ -81,8 +81,8 @@ jobs: affected-components: ${{ needs.smart_ci.outputs.affected_components }} os: 'windows_2022' build-type: 'Debug' - timeout-minutes: 60 - + timeout-minutes: 90 + Overall_Status: name: ci/gha_overall_status_windows_debug needs: [ Smart_CI, Build, CXX_Unit_Tests ]