update_engine: Make dd less verbose.

update_engine unit tests use the "dd" command for setting up some test
cases. By default, dd print the status of the operation on success.

This patch removes the status message reducing the unnecessary logs.

BUG=None
TEST=`FEATURES=test emerge-link update_engine`

Change-Id: I6dbb7029a8dce9acf1309da1844af558a2bdab56
Reviewed-on: https://chromium-review.googlesource.com/259190
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/delta_performer_unittest.cc b/delta_performer_unittest.cc
index 71c650c..6aa61a3 100644
--- a/delta_performer_unittest.cc
+++ b/delta_performer_unittest.cc
@@ -290,7 +290,7 @@
 
   // Extend the "partitions" holding the file system a bit.
   EXPECT_EQ(0, System(base::StringPrintf(
-      "dd if=/dev/zero of=%s seek=%d bs=1 count=1",
+      "dd if=/dev/zero of=%s seek=%d bs=1 count=1 status=none",
       state->a_img.c_str(),
       state->image_size + 1024 * 1024 - 1)));
   EXPECT_EQ(state->image_size + 1024 * 1024, utils::FileSize(state->a_img));
@@ -343,7 +343,7 @@
 
     EXPECT_EQ(0,
               System(base::StringPrintf("dd if=/dev/zero of=%s/move-semi-sparse"
-                                        " bs=1 seek=4096 count=1",
+                                        " bs=1 seek=4096 count=1 status=none",
                                         a_mnt.c_str()).c_str()));
 
     // Write 1 MiB of 0xff to try to catch the case where writing a bsdiff
@@ -362,7 +362,7 @@
   } else {
     test_utils::CreateExtImageAtPath(state->b_img, nullptr);
     EXPECT_EQ(0, System(base::StringPrintf(
-        "dd if=/dev/zero of=%s seek=%d bs=1 count=1",
+        "dd if=/dev/zero of=%s seek=%d bs=1 count=1 status=none",
         state->b_img.c_str(),
         state->image_size + 1024 * 1024 - 1)));
     EXPECT_EQ(state->image_size + 1024 * 1024, utils::FileSize(state->b_img));
@@ -400,12 +400,12 @@
 
     EXPECT_EQ(0, System(base::StringPrintf("dd if=/dev/zero "
                                            "of=%s/move-semi-sparse "
-                                           "bs=1 seek=4096 count=1",
+                                           "bs=1 seek=4096 count=1 status=none",
                                            b_mnt.c_str()).c_str()));
 
     EXPECT_EQ(0, System(base::StringPrintf("dd if=/dev/zero "
                                            "of=%s/partsparse bs=1 "
-                                           "seek=4096 count=1",
+                                           "seek=4096 count=1 status=none",
                                            b_mnt.c_str()).c_str()));
     EXPECT_EQ(0, System(base::StringPrintf("cp %s/srchardlink0 %s/tmp && "
                                            "mv %s/tmp %s/srchardlink1",
diff --git a/filesystem_copier_action_unittest.cc b/filesystem_copier_action_unittest.cc
index 5b4c3ab..51eb318 100644
--- a/filesystem_copier_action_unittest.cc
+++ b/filesystem_copier_action_unittest.cc
@@ -409,7 +409,7 @@
   test_utils::CreateExtImageAtPath(img, nullptr);
   // Extend the "partition" holding the file system from 10MiB to 20MiB.
   EXPECT_EQ(0, test_utils::System(base::StringPrintf(
-      "dd if=/dev/zero of=%s seek=20971519 bs=1 count=1",
+      "dd if=/dev/zero of=%s seek=20971519 bs=1 count=1 status=none",
       img.c_str())));
   EXPECT_EQ(20 * 1024 * 1024, utils::FileSize(img));
 
diff --git a/payload_generator/metadata_unittest.cc b/payload_generator/metadata_unittest.cc
index 6bc56b7..492fd69 100644
--- a/payload_generator/metadata_unittest.cc
+++ b/payload_generator/metadata_unittest.cc
@@ -84,9 +84,9 @@
     string a_img_mnt;
     test_utils::ScopedLoopMounter a_img_mount(a_img, &a_img_mnt, 0);
     test_utils::System(
-        base::StringPrintf("dd if=/dev/zero of=%s/test_file bs=%d count=%d",
-                           a_img_mnt.c_str(), block_size,
-                           EXT2_NDIR_BLOCKS + 1));
+        base::StringPrintf(
+            "dd if=/dev/zero of=%s/test_file bs=%d count=%d status=none",
+            a_img_mnt.c_str(), block_size, EXT2_NDIR_BLOCKS + 1));
   }
 
   test_utils::System(
diff --git a/postinstall_runner_action_unittest.cc b/postinstall_runner_action_unittest.cc
index fc61f4e..0460c6c 100644
--- a/postinstall_runner_action_unittest.cc
+++ b/postinstall_runner_action_unittest.cc
@@ -129,7 +129,8 @@
 
   // Create a 10MiB sparse file to be used as image; format it as ext2.
   ASSERT_EQ(0, System(
-          "dd if=/dev/zero of=image.dat seek=10485759 bs=1 count=1"));
+          "dd if=/dev/zero of=image.dat seek=10485759 bs=1 count=1 "
+          "status=none"));
   ASSERT_EQ(0, System("mkfs.ext2 -F image.dat"));
 
   // Create a uniquely named image mount point, mount the image.
diff --git a/test_utils.cc b/test_utils.cc
index beda798..0071bb8 100644
--- a/test_utils.cc
+++ b/test_utils.cc
@@ -163,7 +163,7 @@
                                size_t size,
                                int block_size) {
   EXPECT_EQ(0, System(StringPrintf("dd if=/dev/zero of=%s"
-                                   " seek=%zu bs=1 count=1",
+                                   " seek=%zu bs=1 count=1 status=none",
                                    path.c_str(), size)));
   EXPECT_EQ(0, System(StringPrintf("mkfs.ext3 -b %d -F %s",
                                    block_size, path.c_str())));
@@ -176,7 +176,7 @@
   ScopedDirRemover mount_path_unlinker(mount_path);
 
   EXPECT_EQ(0, System(StringPrintf("dd if=/dev/zero of=%s"
-                                   " seek=10485759 bs=1 count=1",
+                                   " seek=10485759 bs=1 count=1 status=none",
                                    path.c_str())));
   EXPECT_EQ(0, System(StringPrintf("mkfs.ext3 -b 4096 -F %s", path.c_str())));
   EXPECT_EQ(0, System(StringPrintf("mount -o loop %s %s", path.c_str(),
diff --git a/utils_unittest.cc b/utils_unittest.cc
index 2ac95cb..3010738 100644
--- a/utils_unittest.cc
+++ b/utils_unittest.cc
@@ -280,7 +280,7 @@
   test_utils::CreateExtImageAtPath(img, nullptr);
   // Extend the "partition" holding the file system from 10MiB to 20MiB.
   EXPECT_EQ(0, test_utils::System(base::StringPrintf(
-      "dd if=/dev/zero of=%s seek=20971519 bs=1 count=1",
+      "dd if=/dev/zero of=%s seek=20971519 bs=1 count=1 status=none",
       img.c_str())));
   EXPECT_EQ(20 * 1024 * 1024, utils::FileSize(img));
   int block_count = 0;