Fail when handle cannot be obtain for an allocation

If a handle cannot be obtained, like PRIME_HANDLE_TO_FD, then
properly check for the error and propagate it upwards.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2022-11-10 02:57:51 +00:00
committed by Compute-Runtime-Automation
parent ddd5dd99ef
commit 4dfdbd612d
24 changed files with 1010 additions and 119 deletions

View File

@@ -227,7 +227,9 @@ TEST(GraphicsAllocationTest, givenAlwaysResidentAllocationWhenUpdateTaskCountThe
TEST(GraphicsAllocationTest, givenDefaultGraphicsAllocationWhenInternalHandleIsBeingObtainedThenZeroIsReturned) {
MockGraphicsAllocation graphicsAllocation;
EXPECT_EQ(0llu, graphicsAllocation.peekInternalHandle(nullptr));
uint64_t handle = 0;
graphicsAllocation.peekInternalHandle(nullptr, handle);
EXPECT_EQ(0ull, handle);
}
TEST(GraphicsAllocationTest, givenDefaultGraphicsAllocationWhenGettingNumHandlesThenZeroIsReturned) {