From c1784f14e8cf8a74bb8bd68382e69542968d8ed8 Mon Sep 17 00:00:00 2001 From: Kamil Kopryk Date: Wed, 11 Sep 2024 11:56:34 +0000 Subject: [PATCH] test: correct sizeToCompare to in ocl aub test Related-To: NEO-10681 Signed-off-by: Kamil Kopryk --- .../aub_inline_data_local_id_tests_xehp_and_later.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencl/test/unit_test/aub_tests/command_queue/aub_inline_data_local_id_tests_xehp_and_later.cpp b/opencl/test/unit_test/aub_tests/command_queue/aub_inline_data_local_id_tests_xehp_and_later.cpp index 81a65ee0a2..c45002b593 100644 --- a/opencl/test/unit_test/aub_tests/command_queue/aub_inline_data_local_id_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/aub_tests/command_queue/aub_inline_data_local_id_tests_xehp_and_later.cpp @@ -195,7 +195,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubInlineDataTest, givenCrossThreadFitI auto *crossThreadData = reinterpret_cast(kernel->getCrossThreadData()); crossThreadData = ptrOffset(crossThreadData, offsetInBytes); - EXPECT_EQ(0, memcmp(inlineDataPointer, crossThreadData, inlineSize - offsetInBytes)); + auto crossThreadDataSize = kernel->getCrossThreadDataSize(); + auto sizeToCompare = std::min(inlineSize - offsetInBytes, crossThreadDataSize - offsetInBytes); + + EXPECT_EQ(0, memcmp(inlineDataPointer, crossThreadData, sizeToCompare)); }, walkerVariant);