mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
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:
committed by
Compute-Runtime-Automation
parent
1ffc826808
commit
49cc1a0ba0
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user