AU: tolerate files that are symlinks in src image, yet not in new image.
This fixes a bug in delta diff generation.
BUG=chromium-os:12090
TEST=unittests; generated delta w/ problematic images
Change-Id: Ic48b012d0d9e4f37edbdcf4140d0fe9c4879e7cd
Review URL: http://codereview.chromium.org/6528006
diff --git a/delta_performer_unittest.cc b/delta_performer_unittest.cc
index cceffcf..bf4dcc7 100755
--- a/delta_performer_unittest.cc
+++ b/delta_performer_unittest.cc
@@ -38,7 +38,7 @@
extern const char* kUnittestPublicKeyPath;
namespace {
- const size_t kBlockSize = 4096;
+const size_t kBlockSize = 4096;
} // namespace {}
@@ -256,6 +256,10 @@
EXPECT_EQ(0, system(StringPrintf("dd if=/dev/zero of=%s/partsparese bs=1 "
"seek=4096 count=1",
b_mnt.c_str()).c_str()));
+ EXPECT_EQ(0, system(StringPrintf("cp %s/srchardlink0 %s/tmp && "
+ "mv %s/tmp %s/srchardlink1",
+ b_mnt.c_str(), b_mnt.c_str(),
+ b_mnt.c_str(), b_mnt.c_str()).c_str()));
EXPECT_TRUE(utils::WriteFile(StringPrintf("%s/hardtocompress",
b_mnt.c_str()).c_str(),
reinterpret_cast<const char*>(kRandomString),