fix: use llx for fprintf and IoctlFunctions

Changed format for address printing from %lx to %llx for
fprintf introduced in drm_neo.cpp, and then use
IoctlFunctions::fprintf instead of std::printf to avoid
errors on gcc.

Changed formate for address printing from %lx to %llx for
snprintf introduced in drm_test.cpp, and then type casted
to long long unsigned int explictly to avoid errors.

Related-To: GSD-7611
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
Young Jin Yoon
2024-05-17 17:33:25 +00:00
committed by Compute-Runtime-Automation
parent 1ffc826808
commit 49cc1a0ba0
2 changed files with 21 additions and 20 deletions

View File

@@ -1472,8 +1472,8 @@ TEST(DrmDeathTest, GivenResetStatsWithValidFaultWhenIsGpuHangIsCalledThenProcess
drm.ioctlHelper = std::move(ioctlHelper);
int strSize = std::snprintf(nullptr, 0, "FATAL: Unexpected page fault from GPU at 0x%lx, ctx_id: %u (%s) type: %d (%s), level: %d (%s), access: %d (%s), banned: %d, aborting.\n",
resetStatsFaultExpected.addr,
int strSize = std::snprintf(nullptr, 0, "FATAL: Unexpected page fault from GPU at 0x%llx, ctx_id: %u (%s) type: %d (%s), level: %d (%s), access: %d (%s), banned: %d, aborting.\n",
static_cast<long long unsigned int>(resetStatsFaultExpected.addr),
resetStatsExpected.contextId,
EngineHelpers::engineTypeToString(aub_stream::ENGINE_BCS).c_str(),
resetStatsFaultExpected.type, GpuPageFaultHelpers::faultTypeToString(static_cast<FaultType>(resetStatsFaultExpected.type)).c_str(),
@@ -1483,8 +1483,8 @@ TEST(DrmDeathTest, GivenResetStatsWithValidFaultWhenIsGpuHangIsCalledThenProcess
1;
std::unique_ptr<char[]> buf(new char[strSize]);
std::snprintf(buf.get(), strSize, "FATAL: Unexpected page fault from GPU at 0x%lx, ctx_id: %u (%s) type: %d (%s), level: %d (%s), access: %d (%s), banned: %d, aborting.\n",
resetStatsFaultExpected.addr,
std::snprintf(buf.get(), strSize, "FATAL: Unexpected page fault from GPU at 0x%llx, ctx_id: %u (%s) type: %d (%s), level: %d (%s), access: %d (%s), banned: %d, aborting.\n",
static_cast<long long unsigned int>(resetStatsFaultExpected.addr),
resetStatsExpected.contextId,
EngineHelpers::engineTypeToString(aub_stream::ENGINE_BCS).c_str(),
resetStatsFaultExpected.type, GpuPageFaultHelpers::faultTypeToString(static_cast<FaultType>(resetStatsFaultExpected.type)).c_str(),