mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Display error when printing ioctl entries
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
366f4f1394
commit
2dbecfc354
@@ -177,7 +177,7 @@ TEST(DrmTest, 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\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(Bad file descriptor)\n");
|
||||
}
|
||||
|
||||
TEST(DrmTest, givenPrintIoctlTimesWhenCallIoctlThenStatisticsAreGathered) {
|
||||
|
||||
@@ -94,7 +94,7 @@ int Drm::ioctl(unsigned long request, void *arg) {
|
||||
returnedErrno = errno;
|
||||
|
||||
if (printIoctl) {
|
||||
printf("IOCTL %s returns %d, errno %d\n", this->ioctlToString(request).c_str(), ret, returnedErrno);
|
||||
printf("IOCTL %s returns %d, errno %d(%s)\n", this->ioctlToString(request).c_str(), ret, returnedErrno, strerror(returnedErrno));
|
||||
}
|
||||
|
||||
if (measureTime) {
|
||||
|
||||
Reference in New Issue
Block a user