diff --git a/shared/test/common/libult/linux/drm_mock.cpp b/shared/test/common/libult/linux/drm_mock.cpp index 0ed7b3768e..41aa9aa5be 100644 --- a/shared/test/common/libult/linux/drm_mock.cpp +++ b/shared/test/common/libult/linux/drm_mock.cpp @@ -119,8 +119,6 @@ int DrmMock::ioctl(DrmIoctl request, void *arg) { if ((request == DrmIoctl::GemVmDestroy) && (arg != nullptr)) { ioctlCount.gemVmDestroy++; - ioctlCallsCount--; - ioctlCount.total--; return 0; } diff --git a/shared/test/common/os_interface/linux/drm_command_stream_fixture.h b/shared/test/common/os_interface/linux/drm_command_stream_fixture.h index 4db6786e83..5d03027278 100644 --- a/shared/test/common/os_interface/linux/drm_command_stream_fixture.h +++ b/shared/test/common/os_interface/linux/drm_command_stream_fixture.h @@ -71,7 +71,7 @@ class DrmCommandStreamTest : public ::testing::Test { } // Expect 1 call with DRM_IOCTL_I915_GEM_CONTEXT_DESTROY request on destroyDrmContext // Expect 1 call with DRM_IOCTL_GEM_CLOSE request on BufferObject close - mock->expectedIoctlCallsOnDestruction = mock->ioctlCallsCount + 2; + mock->expectedIoctlCallsOnDestruction = mock->ioctlCallsCount + 2 + static_cast(mock->virtualMemoryIds.size()); mock->expectIoctlCallsOnDestruction = true; } diff --git a/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_prelim_tests.cpp index 91935d9b1d..e594d95428 100644 --- a/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_prelim_tests.cpp @@ -324,7 +324,7 @@ class DrmCommandStreamForceTileTest : public ::testing::Test { delete csr; // Expect 2 calls with DRM_IOCTL_I915_GEM_CONTEXT_DESTROY request on OsContextLinux destruction // Expect 1 call with DRM_IOCTL_GEM_CLOSE request on BufferObject close - mock->expectedIoctlCallsOnDestruction = mock->ioctlCallsCount + 3; + mock->expectedIoctlCallsOnDestruction = mock->ioctlCallsCount + 3 + static_cast(mock->virtualMemoryIds.size()); mock->expectIoctlCallsOnDestruction = true; } @@ -420,7 +420,7 @@ struct DrmImplicitScalingCommandStreamTest : ::testing::Test { void TearDown() override { // Expect 2 calls with DRM_IOCTL_I915_GEM_CONTEXT_DESTROY request on OsContextLinux destruction // Expect 1 call with DRM_IOCTL_GEM_CLOSE request on BufferObject close - drm->expectedIoctlCallsOnDestruction = drm->ioctlCallsCount + 3; + drm->expectedIoctlCallsOnDestruction = drm->ioctlCallsCount + 3 + static_cast(drm->virtualMemoryIds.size()); drm->expectIoctlCallsOnDestruction = true; }