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

Unified Diff: src/platform/update_engine/test_utils.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/test_utils.h ('k') | src/platform/update_engine/update_check_action.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/test_utils.cc
diff --git a/src/platform/update_engine/test_utils.cc b/src/platform/update_engine/test_utils.cc
index d916458e30387b07bc55a094b4cdff39f2647ba3..f83ddf98d1ba33cad0ff6697012cac67df92b0ee 100644
--- a/src/platform/update_engine/test_utils.cc
+++ b/src/platform/update_engine/test_utils.cc
@@ -177,26 +177,25 @@ bool ExpectVectorsEq(const vector<char>& a, const vector<char>& b) {
void CreateExtImageAtPath(const string& path, vector<string>* out_paths) {
// create 10MiB sparse file
- const char* const mount_path = kMountPath.c_str();
EXPECT_EQ(0, System(StringPrintf("dd if=/dev/zero of=%s"
" seek=10485759 bs=1 count=1",
path.c_str())));
EXPECT_EQ(0, System(StringPrintf("mkfs.ext3 -F %s", path.c_str())));
- EXPECT_EQ(0, System(StringPrintf("mkdir -p %s", mount_path)));
+ EXPECT_EQ(0, System(StringPrintf("mkdir -p %s", kMountPath)));
EXPECT_EQ(0, System(StringPrintf("mount -o loop %s %s", path.c_str(),
- mount_path)));
- EXPECT_EQ(0, System(StringPrintf("echo hi > %s/hi", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("echo hello > %s/hello", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/empty_dir", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/mnt", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("echo T > %s/some_dir/test", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("mkfifo %s/some_dir/fifo", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("mknod %s/cdev c 2 3", mount_path)));
- EXPECT_EQ(0, System(StringPrintf("ln -s /some/target %s/sym", mount_path)));
+ kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("echo hi > %s/hi", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("echo hello > %s/hello", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/empty_dir", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/mnt", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("echo T > %s/some_dir/test", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("mkfifo %s/some_dir/fifo", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("mknod %s/cdev c 2 3", kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("ln -s /some/target %s/sym", kMountPath)));
EXPECT_EQ(0, System(StringPrintf("ln %s/some_dir/test %s/testlink",
- mount_path, mount_path)));
- EXPECT_EQ(0, System(StringPrintf("umount %s", mount_path)));
+ kMountPath, kMountPath)));
+ EXPECT_EQ(0, System(StringPrintf("umount %s", kMountPath)));
if (out_paths) {
out_paths->clear();
« no previous file with comments | « src/platform/update_engine/test_utils.h ('k') | src/platform/update_engine/update_check_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698