Skip to content

Commit e3bfc16

Browse files
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 <[email protected]>
1 parent 036a41a commit e3bfc16

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

conformance_tests/sysman/test_sysman_memory/src/test_sysman_memory.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "logging/logging.hpp"
1111
#include "utils/utils.hpp"
1212
#include "test_harness/test_harness.hpp"
13-
#include <condition_variable>
1413
#include <thread>
1514

1615
namespace lzt = level_zero_tests;
@@ -20,8 +19,6 @@ namespace lzt = level_zero_tests;
2019
namespace {
2120

2221
std::mutex mem_mutex;
23-
std::condition_variable condition_variable;
24-
uint32_t ready = 0;
2522

2623
#ifdef USE_ZESINIT
2724
class MemoryModuleZesTest : public lzt::ZesSysmanCtsClass {};
@@ -405,13 +402,11 @@ void getMemoryState(ze_device_handle_t device) {
405402
<< _ze_result_t(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
406403
}
407404
std::unique_lock<std::mutex> lock(mem_mutex);
408-
ready++;
409-
condition_variable.notify_all();
410-
condition_variable.wait(lock, [] { return ready == 2; });
411405
for (auto mem_handle : mem_handles) {
412406
ASSERT_NE(nullptr, mem_handle);
413407
lzt::get_mem_state(mem_handle);
414408
}
409+
lock.unlock();
415410
}
416411

417412
void getRasState(ze_device_handle_t device) {
@@ -423,14 +418,12 @@ void getRasState(ze_device_handle_t device) {
423418
<< _ze_result_t(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
424419
}
425420
std::unique_lock<std::mutex> lock(mem_mutex);
426-
ready++;
427-
condition_variable.notify_all();
428-
condition_variable.wait(lock, [] { return ready == 2; });
429421
for (auto ras_handle : ras_handles) {
430422
ASSERT_NE(nullptr, ras_handle);
431423
ze_bool_t clear = 0;
432424
lzt::get_ras_state(ras_handle, clear);
433425
}
426+
lock.unlock();
434427
}
435428

436429
TEST_F(

0 commit comments

Comments
 (0)