applypatch: Dump patch info on mismatching patching result.

After splitting the previously flaky
ApplyPatchModesTest#PatchModeEmmcTarget tests,
PatchModeEmmcTargetWithMultiplePatches now becomes the sole victim. This
CL dumps additional info to narrow down the cause.

Bug: 67849209
Test: `recovery_component_test` on marlin.
Test: It dumps additional info after using corrupt bonus.file.
Change-Id: Ic5436de457cc882a51d03f49d5cee70077f7d3df
This commit is contained in:
Tao Bao
2018-04-19 12:35:14 -07:00
parent 73e6644777
commit 4f83430471
2 changed files with 21 additions and 1 deletions
+5
View File
@@ -344,6 +344,11 @@ TEST_F(ApplyPatchModesTest, PatchModeEmmcTargetWithMultiplePatches) {
patch1.c_str(),
patch2.c_str(),
patch3.c_str() };
// TODO(b/67849209): Remove after addressing the flakiness.
printf("Calling applypatch_modes with the following args:\n");
for (const auto& arg : args) {
printf(" %s\n", arg);
}
ASSERT_EQ(0, applypatch_modes(args.size(), args.data()));
}