From e3bfc162def022cb6cdc6e539e6d9dfaf57ad46a Mon Sep 17 00:00:00 2001 From: Pratik Bari Date: Mon, 16 Dec 2024 12:33:12 +0000 Subject: [PATCH] fix: Removed the condition variable check from Sysman Memory CTS During the call to fetch the memory and the RAS states, the condition variable check has been removed. Related-To: VLCLJ-2343 Signed-off-by: Pratik Bari --- .../test_sysman_memory/src/test_sysman_memory.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/conformance_tests/sysman/test_sysman_memory/src/test_sysman_memory.cpp b/conformance_tests/sysman/test_sysman_memory/src/test_sysman_memory.cpp index 7b7febaa..a7b677de 100644 --- a/conformance_tests/sysman/test_sysman_memory/src/test_sysman_memory.cpp +++ b/conformance_tests/sysman/test_sysman_memory/src/test_sysman_memory.cpp @@ -10,7 +10,6 @@ #include "logging/logging.hpp" #include "utils/utils.hpp" #include "test_harness/test_harness.hpp" -#include #include namespace lzt = level_zero_tests; @@ -20,8 +19,6 @@ namespace lzt = level_zero_tests; namespace { std::mutex mem_mutex; -std::condition_variable condition_variable; -uint32_t ready = 0; #ifdef USE_ZESINIT class MemoryModuleZesTest : public lzt::ZesSysmanCtsClass {}; @@ -405,13 +402,11 @@ void getMemoryState(ze_device_handle_t device) { << _ze_result_t(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); } std::unique_lock lock(mem_mutex); - ready++; - condition_variable.notify_all(); - condition_variable.wait(lock, [] { return ready == 2; }); for (auto mem_handle : mem_handles) { ASSERT_NE(nullptr, mem_handle); lzt::get_mem_state(mem_handle); } + lock.unlock(); } void getRasState(ze_device_handle_t device) { @@ -423,14 +418,12 @@ void getRasState(ze_device_handle_t device) { << _ze_result_t(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); } std::unique_lock lock(mem_mutex); - ready++; - condition_variable.notify_all(); - condition_variable.wait(lock, [] { return ready == 2; }); for (auto ras_handle : ras_handles) { ASSERT_NE(nullptr, ras_handle); ze_bool_t clear = 0; lzt::get_ras_state(ras_handle, clear); } + lock.unlock(); } TEST_F(