fix: Add bind info for allocation from ipc handle in xe

Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-09-13 05:32:29 +00:00
committed by Compute-Runtime-Automation
parent d4f80fb957
commit 1ab0467301
6 changed files with 24 additions and 0 deletions

View File

@@ -1601,3 +1601,15 @@ TEST(IoctlHelperXeTest, whenXeShowBindTableIsCalledThenBindLogsArePrinted) {
)";
EXPECT_STREQ(expectedOutput.c_str(), output.c_str());
}
TEST(IoctlHelperXeTest, whenFillBindInfoForIpcHandleIsCalledThenBindInfoIsCorrect) {
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
auto xeIoctlHelper = std::make_unique<MockIoctlHelperXe>(drm);
uint32_t handle = 100;
size_t size = 1024u;
xeIoctlHelper->fillBindInfoForIpcHandle(handle, size);
auto bindInfo = xeIoctlHelper->bindInfo[0];
EXPECT_EQ(bindInfo.handle, handle);
EXPECT_EQ(bindInfo.size, size);
}