Remove unnecessary code.

- There is not need to capture stream anymore.
- This may hide potential problems.

Change-Id: I0fdb3752ef7684a95aaf8e29b2c4394722ff0aa3
This commit is contained in:
Mrozek, Michal
2018-03-05 13:57:38 +01:00
committed by sys_ocldev
parent a93154db1b
commit cfe1f72dcb
3 changed files with 0 additions and 14 deletions

View File

@@ -108,11 +108,9 @@ TEST_F(DrmBufferObjectTest, givenDrmWithCoherencyPatchActiveWhenExecIsCalledWith
}
TEST_F(DrmBufferObjectTest, exec_ioctlFailed) {
testing::internal::CaptureStderr();
mock->ioctl_expected = 1;
mock->ioctl_res = -1;
EXPECT_THROW(bo->exec(0, 0, 0), std::exception);
testing::internal::GetCapturedStderr();
}
TEST_F(DrmBufferObjectTest, setTiling_success) {
@@ -194,7 +192,6 @@ TEST_F(DrmBufferObjectTest, onPinBBhasOnlyBbEndAndNoForceNonCoherent) {
TEST_F(DrmBufferObjectTest, onPinIoctlFailed) {
std::unique_ptr<uint32_t[]> buff(new uint32_t[1024]);
testing::internal::CaptureStderr();
mock->ioctl_expected = 1;
mock->ioctl_res = -1;
@@ -204,6 +201,4 @@ TEST_F(DrmBufferObjectTest, onPinIoctlFailed) {
bo->setAddress(buff.get());
auto ret = bo->pin(boToPin.get());
EXPECT_EQ(mock->ioctl_res, ret);
testing::internal::GetCapturedStderr();
}

View File

@@ -59,7 +59,6 @@ class DrmCommandStreamFixture {
void SetUp() {
//gmock
MemoryManagement::fastLeaksDetectionMode = MemoryManagement::LeakDetectionMode::TURN_OFF_LEAK_DETECTION;
stderrCaptured = false;
this->dbgState = new DebugManagerStateRestore();
//make sure this is disabled, we don't want test this now
@@ -80,10 +79,7 @@ class DrmCommandStreamFixture {
delete this->mock;
this->mock = 0;
delete dbgState;
if (stderrCaptured)
testing::internal::GetCapturedStderr();
}
bool stderrCaptured = false;
static const uint64_t alignment = MemoryConstants::allocationAlignment;
DebugManagerStateRestore *dbgState;
};
@@ -466,9 +462,6 @@ TEST_F(DrmCommandStreamTest, GIVENCSRWHENgetDMTHENNotNull) {
}
TEST_F(DrmCommandStreamTest, CheckDrmFreeCloseFailed) {
testing::internal::CaptureStderr();
stderrCaptured = true;
EXPECT_CALL(*mock, ioctl(DRM_IOCTL_I915_GEM_USERPTR, ::testing::_))
.Times(1)
.WillOnce(::testing::DoAll(UserptrSetHandle(17), ::testing::Return(0)));

View File

@@ -493,7 +493,6 @@ TEST_F(DrmMemoryManagerTest, getMinimumSystemSharedMemory) {
}
TEST_F(DrmMemoryManagerTest, BoWaitFailure) {
testing::internal::CaptureStderr();
mock->ioctl_expected = 3; //create+wait+close
BufferObject *bo = memoryManager->allocUserptr(0, (size_t)1024, 0ul, true);
ASSERT_NE(nullptr, bo);
@@ -502,7 +501,6 @@ TEST_F(DrmMemoryManagerTest, BoWaitFailure) {
mock->ioctl_res = 1;
memoryManager->unreference(bo);
testing::internal::GetCapturedStderr();
}
TEST_F(DrmMemoryManagerTest, NullOsHandleStorageAskedForPopulationReturnsFilledPointer) {