fix: add missing registerIpcExportedAllocation

Unify `getIpcMemHandle()` and `getIpcMemHandles()` and fix the issue of
missing IPC handles registration while reducing copy-pasted code.

Also replace `boHandle` with `boHandleWrapper` to leverage `refCount`
properly and avoid double-free.

Related-To: NEO-8904
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
Maciej Bielski
2023-12-15 14:53:51 +00:00
committed by Compute-Runtime-Automation
parent 138fb65401
commit cb448c6c35
4 changed files with 50 additions and 59 deletions

View File

@@ -2462,7 +2462,7 @@ TEST_F(DrmMemoryManagerTestPrelim, whenCreatingAllocationFromMultipleSharedHandl
TEST_F(DrmMemoryManagerTestPrelim, whenCreatingAllocationFromMultipleSharedHandlesWithNoSharingResourcesThenDifferentAllocationsAreReturned) {
mock->ioctlExpected.primeFdToHandle = 4;
mock->ioctlExpected.gemWait = 2;
mock->ioctlExpected.gemClose = 4;
mock->ioctlExpected.gemClose = 2;
std::vector<NEO::osHandle> handles{6, 7};
size_t size = 65536u * 2;