Skip to content

Commit

Permalink
fix: Removed the condition variable check from Sysman Memory CTS (#122)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pratikbariintel authored Jan 15, 2025
1 parent 16e793d commit 50350fd
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand All @@ -19,10 +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 {};
#define MEMORY_TEST MemoryModuleZesTest
Expand Down Expand Up @@ -404,10 +400,6 @@ void getMemoryState(ze_device_handle_t device) {
FAIL() << "No handles found: "
<< _ze_result_t(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
}
std::unique_lock<std::mutex> 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);
Expand All @@ -422,10 +414,6 @@ void getRasState(ze_device_handle_t device) {
FAIL() << "No handles found: "
<< _ze_result_t(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
}
std::unique_lock<std::mutex> 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;
Expand Down

0 comments on commit 50350fd

Please sign in to comment.