mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Dont print error on IOCTL entry after success
This to reduce verbosity and avoid confusions when reading logs. Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
24621e8d16
commit
38ad58bce3
@ -199,7 +199,33 @@ TEST_F(DrmSimpleTests, givenPrintIoctlEntriesWhenCallIoctlThenIoctlIsPrinted) {
|
||||
drm->destroyDrmContext(contextId);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
EXPECT_STREQ(output.c_str(), "IOCTL DRM_IOCTL_I915_GEM_CONTEXT_DESTROY called\nIOCTL DRM_IOCTL_I915_GEM_CONTEXT_DESTROY returns 0, errno 9(Bad file descriptor)\n");
|
||||
EXPECT_STREQ(output.c_str(), "IOCTL DRM_IOCTL_I915_GEM_CONTEXT_DESTROY called\nIOCTL DRM_IOCTL_I915_GEM_CONTEXT_DESTROY returns 0\n");
|
||||
}
|
||||
|
||||
struct DrmFailedIoctlTests : public ::testing::Test {
|
||||
void SetUp() override {
|
||||
if (deviceDescriptorTable[0].deviceId == 0) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(DrmFailedIoctlTests, givenPrintIoctlEntriesWhenCallFailedIoctlThenExpectedIoctlIsPrinted) {
|
||||
::testing::internal::CaptureStdout();
|
||||
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
auto drm = DrmWrap::createDrm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.PrintIoctlEntries.set(true);
|
||||
|
||||
uint32_t contextId = 1u;
|
||||
uint32_t vmId = 100u;
|
||||
drm->queryVmId(contextId, vmId);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
EXPECT_STREQ(output.c_str(), "IOCTL DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM called\nIOCTL DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM returns -1, errno 9(Bad file descriptor)\n");
|
||||
}
|
||||
|
||||
TEST_F(DrmSimpleTests, givenPrintIoctlTimesWhenCallIoctlThenStatisticsAreGathered) {
|
||||
|
Reference in New Issue
Block a user