test: fixes a clang-tidy error

Related-To: NEO-13715

Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
This commit is contained in:
Chandio, Bibrak Qamar
2025-04-18 18:35:11 +00:00
committed by Compute-Runtime-Automation
parent 42b097ab4f
commit 61a9901edd

View File

@@ -217,12 +217,6 @@ TEST_F(CommandListCreateTests, givenValidSystemAlloctedPtrAndNotSharedSystemAllo
debugManager.flags.EnableSharedSystemUsmSupport.set(1u);
debugManager.flags.EnableRecoverablePageFaults.set(1u);
size_t size = 10;
void *ptr = nullptr;
ptr = malloc(size);
EXPECT_NE(nullptr, ptr);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
ASSERT_NE(nullptr, commandList);
@@ -232,6 +226,12 @@ TEST_F(CommandListCreateTests, givenValidSystemAlloctedPtrAndNotSharedSystemAllo
sharedSystemMemCapabilities = 0; // enables return false for Device::areSharedSystemAllocationsAllowed()
size_t size = 10;
void *ptr = nullptr;
ptr = malloc(size);
EXPECT_NE(nullptr, ptr);
auto res = commandList->executeMemAdvise(device, ptr, size, ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION);
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, res);