mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
fix: Fixed function for printing BO binding results to show correct vm id
Related-To: NEO-12952 Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e1b33a657c
commit
027e5597a3
@@ -534,7 +534,8 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindSucceedsThenPr
|
||||
|
||||
std::string bindOutput = capture.getCapturedStdout();
|
||||
std::stringstream expected;
|
||||
expected << "bind BO-0 to VM 0, drmVmId = " << drm->latestCreatedVmId << ", range: 0 - 0, size: 0, result: 0\n";
|
||||
expected << "bind BO-0 to VM " << drm->latestCreatedVmId << ", vmHandleId = 0"
|
||||
<< ", range: 0 - 0, size: 0, result: 0\n";
|
||||
EXPECT_STREQ(bindOutput.c_str(), expected.str().c_str()) << bindOutput;
|
||||
expected.str("");
|
||||
|
||||
@@ -544,7 +545,8 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindSucceedsThenPr
|
||||
EXPECT_FALSE(bo.bindInfo[contextId][0]);
|
||||
|
||||
std::string unbindOutput = capture.getCapturedStdout();
|
||||
expected << "unbind BO-0 from VM 0, drmVmId = " << drm->latestCreatedVmId << ", range: 0 - 0, size: 0, result: 0\n";
|
||||
expected << "unbind BO-0 from VM " << drm->latestCreatedVmId << ", vmHandleId = 0"
|
||||
<< ", range: 0 - 0, size: 0, result: 0\n";
|
||||
EXPECT_STREQ(unbindOutput.c_str(), expected.str().c_str()) << unbindOutput;
|
||||
}
|
||||
|
||||
@@ -593,7 +595,8 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindFailsThenPrint
|
||||
|
||||
std::string bindOutput = testing::internal::GetCapturedStderr();
|
||||
std::stringstream expected;
|
||||
expected << "bind BO-0 to VM 0, drmVmId = " << drm->latestCreatedVmId << ", range: 0 - 0, size: 0, result: -1, errno: 22\n";
|
||||
expected << "bind BO-0 to VM " << drm->latestCreatedVmId << ", vmHandleId = 0"
|
||||
<< ", range: 0 - 0, size: 0, result: -1, errno: 22\n";
|
||||
EXPECT_TRUE(hasSubstr(expected.str(), expected.str())) << bindOutput;
|
||||
expected.str("");
|
||||
testing::internal::CaptureStderr();
|
||||
@@ -603,7 +606,8 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindFailsThenPrint
|
||||
EXPECT_TRUE(bo.bindInfo[contextId][0]);
|
||||
|
||||
std::string unbindOutput = testing::internal::GetCapturedStderr();
|
||||
expected << "unbind BO-0 from VM 0, drmVmId = " << drm->latestCreatedVmId << ", range: 0 - 0, size: 0, result: -1, errno: 22";
|
||||
expected << "unbind BO-0 from VM " << drm->latestCreatedVmId << ", vmHandleId = 0"
|
||||
<< ", range: 0 - 0, size: 0, result: -1, errno: 22";
|
||||
EXPECT_TRUE(hasSubstr(unbindOutput, expected.str())) << unbindOutput;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user