From 7bc26e9f95a4a892040a9351a275533618b1e52e Mon Sep 17 00:00:00 2001 From: Lukasz Jobczyk Date: Mon, 4 Oct 2021 10:16:31 +0000 Subject: [PATCH] Refactor IOCTL statistics test Signed-off-by: Lukasz Jobczyk --- opencl/test/unit_test/linux/main_linux_dll.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencl/test/unit_test/linux/main_linux_dll.cpp b/opencl/test/unit_test/linux/main_linux_dll.cpp index 421df046a2..9e7cfdfda4 100644 --- a/opencl/test/unit_test/linux/main_linux_dll.cpp +++ b/opencl/test/unit_test/linux/main_linux_dll.cpp @@ -203,7 +203,6 @@ TEST_F(DrmSimpleTests, givenPrintIoctlTimesWhenCallIoctlThenStatisticsAreGathere struct DrmMock : public Drm { using Drm::ioctlStatistics; }; - ::testing::internal::CaptureStdout(); constexpr long long initialMin = std::numeric_limits::max(); constexpr long long initialMax = 0; @@ -289,6 +288,8 @@ TEST_F(DrmSimpleTests, givenPrintIoctlTimesWhenCallIoctlThenStatisticsAreGathere EXPECT_EQ(1u, destroyData->second.count); EXPECT_NE(0, destroyData->second.totalTime); + ::testing::internal::CaptureStdout(); + delete drm; std::string output = ::testing::internal::GetCapturedStdout();