diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp index e535e3a75c..d61b7a505f 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp @@ -6,12 +6,14 @@ */ #include "shared/source/command_stream/wait_status.h" +#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/file_io.h" #include "shared/source/helpers/timestamp_packet.h" #include "shared/source/utilities/wait_util.h" #include "shared/test/common/libult/ult_command_stream_receiver.h" #include "shared/test/common/mocks/mock_command_stream_receiver.h" #include "shared/test/common/mocks/mock_timestamp_container.h" +#include "shared/test/common/mocks/mock_zebin_wrapper.h" #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/common/test_macros/hw_test.h" @@ -32,7 +34,7 @@ using namespace NEO; using MultiRootDeviceCommandStreamReceiverBufferTests = MultiRootDeviceFixture; HWTEST_F(MultiRootDeviceCommandStreamReceiverBufferTests, givenMultipleEventInMultiRootDeviceEnvironmentWhenTheyArePassedToEnqueueWithSubmissionThenCsIsWaitingForEventsFromPreviousDevices) { - USE_REAL_FILE_SYSTEM(); + FORBID_REAL_FILE_SYSTEM_CALLS(); using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT; cl_int retVal = 0; @@ -42,9 +44,14 @@ HWTEST_F(MultiRootDeviceCommandStreamReceiverBufferTests, givenMultipleEventInMu auto pCmdQ1 = context->getSpecialQueue(1u); auto pCmdQ2 = context->getSpecialQueue(2u); - std::unique_ptr program(Program::createBuiltInFromSource("FillBufferBytes", context.get(), context->getDevices(), &retVal)); + MockZebinWrapper<>::Descriptor desc{}; + desc.isStateless = NEO::CompilerProductHelper::create(defaultHwInfo->platform.eProductFamily)->isForceToStatelessRequired(); + MockZebinWrapper mockZebin{*defaultHwInfo, desc}; + mockZebin.setAsMockCompilerReturnedBinary(); + + std::unique_ptr program(Program::createBuiltInFromSource(mockZebin.kernelName, context.get(), context->getDevices(), &retVal)); program->build(program->getDevices(), nullptr); - std::unique_ptr kernel(Kernel::create(program.get(), program->getKernelInfoForKernel("FillBufferBytes"), *context->getDevice(0), retVal)); + std::unique_ptr kernel(Kernel::create(program.get(), program->getKernelInfoForKernel(mockZebin.kernelName), *context->getDevice(0), retVal)); ASSERT_EQ(CL_SUCCESS, retVal); size_t svmSize = 4096;