AU: Changes for deltas on traditional bios machines.

BUG=None
TEST=Attached unittests/tested on image

- Fix uninitialized variable err in action processor unittest

- Let Omaha dictate if an update is a delta or full update

- Bug fix in delta generator for differently-sized images

- More logging when applying delta updates

- Fix infinite loop in http fetcher unittest

- log each HTTP connection to know when a dropped connection is
  reestablished.

- Detect when speed goes below a threshold and reestablish HTTP
  connection (currently < 10bytes/sec for 90 contiguous seconds).

- Fix stack overflow in libcurl http fetcher.

- optimize out a lot of needless CPU usage in libcurl http fetcher
  (turns out adding a glib main loop source uses a lot of CPU).

- subprocess: pass PATH, log stdout/stderr

- postinstall runner: support for ext3 and ext4 target filesystems.

Review URL: http://codereview.chromium.org/2805027
diff --git a/http_fetcher_unittest.cc b/http_fetcher_unittest.cc
index a0e620b..4cabd1c 100644
--- a/http_fetcher_unittest.cc
+++ b/http_fetcher_unittest.cc
@@ -82,12 +82,21 @@
       return;
     }
     int rc = 1;
+    int tries = 10;
+    started_ = true;
     while (0 != rc) {
+      LOG(INFO) << "running wget to start";
       rc = system((string("wget --output-document=/dev/null ") +
                    LocalServerUrlForPath("/test")).c_str());
+      LOG(INFO) << "done running wget to start";
       usleep(10 * 1000);  // 10 ms
+      tries--;
+      if (tries == 0) {
+        LOG(ERROR) << "Unable to start server.";
+        started_ = false;
+        break;
+      }
     }
-    started_ = true;
     free(argv[0]);
     return;
   }
@@ -95,8 +104,10 @@
     if (!started_)
       return;
     // request that the server exit itself
+    LOG(INFO) << "running wget to exit";
     int rc = system((string("wget -t 1 --output-document=/dev/null ") +
                     LocalServerUrlForPath("/quitquitquit")).c_str());
+    LOG(INFO) << "done running wget to exit";
     if (validate_quit_)
       EXPECT_EQ(0, rc);
     waitpid(pid_, NULL, 0);
@@ -111,7 +122,7 @@
  public:
   HttpFetcher* NewLargeFetcher() {
     LibcurlHttpFetcher *ret = new LibcurlHttpFetcher;
-    ret->set_idle_ms(1);  // speeds up test execution
+    ret->set_idle_ms(1000);  // speeds up test execution
     return ret;
   }
   HttpFetcher* NewSmallFetcher() {
@@ -181,6 +192,25 @@
   g_main_loop_unref(loop);
 }
 
+TYPED_TEST(HttpFetcherTest, SimpleBigTest) {
+  GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE);
+  {
+    HttpFetcherTestDelegate delegate;
+    delegate.loop_ = loop;
+    scoped_ptr<HttpFetcher> fetcher(this->NewLargeFetcher());
+    fetcher->set_delegate(&delegate);
+
+    typename TestFixture::HttpServer server;
+    ASSERT_TRUE(server.started_);
+
+    StartTransferArgs start_xfer_args = {fetcher.get(), this->BigUrl()};
+
+    g_timeout_add(0, StartTransfer, &start_xfer_args);
+    g_main_loop_run(loop);
+  }
+  g_main_loop_unref(loop);
+}
+
 namespace {
 class PausingHttpFetcherTestDelegate : public HttpFetcherDelegate {
  public: