Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: src/platform/update_engine/install_action_unittest.cc

Issue 492008: AU: Try delta updates first, then full updates (Closed)
Patch Set: use mkstemp Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/update_engine/install_action.cc ('k') | src/platform/update_engine/integration_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/install_action_unittest.cc
diff --git a/src/platform/update_engine/install_action_unittest.cc b/src/platform/update_engine/install_action_unittest.cc
index 68796e6b9e71536fd9e1f5f1e831167950454501..3fd42d47d54fb6e575a29070edcf72aaa3982d16 100644
--- a/src/platform/update_engine/install_action_unittest.cc
+++ b/src/platform/update_engine/install_action_unittest.cc
@@ -126,11 +126,16 @@ TEST(InstallActionTest, RunAsRootDiffTest) {
}
const char* const new_dir_cstr = new_dir.c_str();
EXPECT_EQ(0, System(StringPrintf("mkdir -p '%s/newdir'", new_dir_cstr)));
+ EXPECT_EQ(0, System(StringPrintf("chmod 03755 '%s/newdir'", new_dir_cstr)));
EXPECT_EQ(0, System(StringPrintf("mkdir -p '%s/newdir/x'", new_dir_cstr)));
EXPECT_EQ(0, System(StringPrintf("echo -n foo > '%s/newdir/x/file'",
new_dir_cstr)));
+ EXPECT_EQ(0, System(StringPrintf("touch '%s/new_empty'", new_dir_cstr)));
+ EXPECT_EQ(0, System(StringPrintf("chmod 04644 '%s/new_empty'",
+ new_dir_cstr)));
EXPECT_EQ(0, System(StringPrintf("echo -n x >> '%s/big_file'",
new_dir_cstr)));
+ EXPECT_EQ(0, System(StringPrintf("chmod 02644 '%s/big_file'", new_dir_cstr)));
// Make a symlink that compresses well:
EXPECT_EQ(0, System(StringPrintf(
"ln -s "
@@ -150,6 +155,7 @@ TEST(InstallActionTest, RunAsRootDiffTest) {
original_dir,
new_dir,
"delta",
+ set<string>(),
new_dir + "/bdev_gz"));
ASSERT_EQ(0, System(string("umount ") + original_dir));
@@ -204,7 +210,7 @@ TEST(InstallActionTest, RunAsRootDiffTest) {
}
LOG(INFO) << "new_count = " << new_count;
EXPECT_EQ(new_count, original_count);
- EXPECT_EQ(19, original_count);
+ EXPECT_EQ(20, original_count);
// Make sure hard-link installed properly
{
« no previous file with comments | « src/platform/update_engine/install_action.cc ('k') | src/platform/update_engine/integration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698