Add returned status to MemoryOperationsHandler

Change-Id: Ic8685e3711cec03d8f83d371fa7152ee095a47a0
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2019-08-29 13:46:49 +02:00
committed by sys_ocldev
parent 77e22bd81b
commit 7827501b91
21 changed files with 130 additions and 107 deletions

View File

@@ -23,12 +23,12 @@ struct DrmMemoryOperationsHandlerTest : public ::testing::Test {
};
TEST_F(DrmMemoryOperationsHandlerTest, whenMakingResidentAllocaionExpectMakeResidentFail) {
EXPECT_FALSE(drmMemoryOperationsHandler->makeResident(graphicsAllocation));
EXPECT_FALSE(drmMemoryOperationsHandler->isResident(graphicsAllocation));
EXPECT_EQ(drmMemoryOperationsHandler->makeResident(graphicsAllocation), MemoryOperationsStatus::UNSUPPORTED);
EXPECT_EQ(drmMemoryOperationsHandler->isResident(graphicsAllocation), MemoryOperationsStatus::UNSUPPORTED);
}
TEST_F(DrmMemoryOperationsHandlerTest, whenEvictingResidentAllocationExpectEvictFalse) {
EXPECT_FALSE(drmMemoryOperationsHandler->makeResident(graphicsAllocation));
EXPECT_FALSE(drmMemoryOperationsHandler->evict(graphicsAllocation));
EXPECT_FALSE(drmMemoryOperationsHandler->isResident(graphicsAllocation));
EXPECT_EQ(drmMemoryOperationsHandler->makeResident(graphicsAllocation), MemoryOperationsStatus::UNSUPPORTED);
EXPECT_EQ(drmMemoryOperationsHandler->evict(graphicsAllocation), MemoryOperationsStatus::UNSUPPORTED);
EXPECT_EQ(drmMemoryOperationsHandler->isResident(graphicsAllocation), MemoryOperationsStatus::UNSUPPORTED);
}