Improve printing ioctls entries
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
085a2af2d6
commit
3c9dcbb1db
|
@ -171,7 +171,7 @@ TEST(DrmTest, givenPrintIoctlEntriesWhenCallIoctlThenIoctlIsPrinted) {
|
|||
drm->destroyDrmContext(contextId);
|
||||
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
EXPECT_STREQ(output.c_str(), "IOCTL 1074291822 called\nIOCTL 1074291822 returns 0, errno 9\n");
|
||||
EXPECT_STREQ(output.c_str(), "IOCTL DRM_IOCTL_I915_GEM_CONTEXT_DESTROY called\nIOCTL DRM_IOCTL_I915_GEM_CONTEXT_DESTROY returns 0, errno 9\n");
|
||||
}
|
||||
|
||||
TEST(DrmTest, givenPrintIoctlTimesWhenCallIoctlThenStatisticsAreGathered) {
|
||||
|
|
|
@ -80,13 +80,13 @@ int Drm::ioctl(unsigned long request, void *arg) {
|
|||
auto printIoctl = DebugManager.flags.PrintIoctlEntries.get();
|
||||
|
||||
if (printIoctl) {
|
||||
printf("IOCTL %lu called\n", request);
|
||||
printf("IOCTL %s called\n", this->ioctlToString(request).c_str());
|
||||
}
|
||||
|
||||
ret = SysCalls::ioctl(getFileDescriptor(), request, arg);
|
||||
|
||||
if (printIoctl) {
|
||||
printf("IOCTL %lu returns %d, errno %d\n", request, ret, errno);
|
||||
printf("IOCTL %s returns %d, errno %d\n", this->ioctlToString(request).c_str(), ret, errno);
|
||||
}
|
||||
|
||||
if (measureTime) {
|
||||
|
|
Loading…
Reference in New Issue