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

Unified Diff: test_utils.cc

Issue 5684002: Add support for bsdiff of file system metadata blocks (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Created 10 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
« test_utils.h ('K') | « test_utils.h ('k') | utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test_utils.cc
diff --git a/test_utils.cc b/test_utils.cc
index c1bdb48063f43bab01aef4852aa4ed4b262edb42..8ce4e56fafa0518169a5d03eca5d07ec2dddad65 100644
--- a/test_utils.cc
+++ b/test_utils.cc
@@ -178,6 +178,16 @@ void FillWithData(vector<char>* buffer) {
}
}
+void CreateEmptyExtImageAtPath(const string& path,
+ size_t size,
+ int block_size) {
+ EXPECT_EQ(0, System(StringPrintf("dd if=/dev/zero of=%s"
+ " seek=%Zu bs=1 count=1",
petkov 2010/12/10 00:46:55 what's %Zu?
thieule 2010/12/14 23:11:21 Looks like %Zu is outdated and the proper format i
+ path.c_str(), size)));
+ EXPECT_EQ(0, System(StringPrintf("mkfs.ext3 -b %d -F %s",
petkov 2010/12/10 00:46:55 we use ext2 now, right?
thieule 2010/12/14 23:11:21 This is a little bit more involved than just here.
+ block_size, path.c_str())));
+}
+
void CreateExtImageAtPath(const string& path, vector<string>* out_paths) {
// create 10MiB sparse file
EXPECT_EQ(0, System(StringPrintf("dd if=/dev/zero of=%s"
« test_utils.h ('K') | « test_utils.h ('k') | utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698