Make UNRECOVERABLE_IF fail in tests.

- Fix tests that were triggering the UNRECOVERABLE scenario
- Change UNRECOVERABLE to DEBUG_BREAK in some places

Change-Id: I479baac4941b485af9ea81a61a1a03d2f3f42e6a
This commit is contained in:
Mrozek, Michal
2017-12-20 14:28:42 +01:00
committed by sys_ocldev
parent b503597ffa
commit 03646887bf
8 changed files with 15 additions and 8 deletions

View File

@@ -111,8 +111,7 @@ TEST_F(DrmBufferObjectTest, exec_ioctlFailed) {
testing::internal::CaptureStderr();
mock->ioctl_expected = 1;
mock->ioctl_res = -1;
auto ret = bo->exec(0, 0, 0);
EXPECT_EQ(mock->ioctl_res, ret);
EXPECT_THROW(bo->exec(0, 0, 0), std::exception);
testing::internal::GetCapturedStderr();
}

View File

@@ -492,8 +492,7 @@ TEST_F(DrmMemoryManagerTest, BoWaitFailure) {
BufferObject *bo = memoryManager->allocUserptr(0, (size_t)1024, 0ul, true);
ASSERT_NE(nullptr, bo);
mock->ioctl_res = -EIO;
auto ret = bo->wait(-1);
EXPECT_EQ(-EIO, ret);
EXPECT_THROW(bo->wait(-1), std::exception);
mock->ioctl_res = 1;
memoryManager->unreference(bo);