[autotest] Remove the stateful-only update path.

This disables the stateful-only update from machine_install().
The feature is left intact (for now) in machine_install_by_devserver.
A future round of cleanup will take care of that code path.

BUG=None
TEST=Run the sanity suite in a local instance

Change-Id: I23680d6f2479874b6b5bd96a1ae9e52020f50cc2
Reviewed-on: https://chromium-review.googlesource.com/1069109
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/server/afe_utils.py b/server/afe_utils.py
index 1edd185..e9d79fe 100644
--- a/server/afe_utils.py
+++ b/server/afe_utils.py
@@ -123,8 +123,7 @@
         image_name, host_attributes = host.machine_install_by_devserver(
                 update_url, force_full_update=force_full_update)
     else:
-        image_name, host_attributes = host.machine_install(
-                update_url, force_full_update=force_full_update)
+        image_name, host_attributes = host.machine_install(update_url)
 
     info = host.host_info_store.get()
     info.attributes.update(host_attributes)
diff --git a/server/cros/autoupdater.py b/server/cros/autoupdater.py
index 869fcb3..848f2d9 100644
--- a/server/cros/autoupdater.py
+++ b/server/cros/autoupdater.py
@@ -534,13 +534,13 @@
             raise update_error
 
 
-    def verify_boot_expectations(self, expected_kernel_state, rollback_message):
+    def verify_boot_expectations(self, expected_kernel, rollback_message):
         """Verifies that we fully booted given expected kernel state.
 
         This method both verifies that we booted using the correct kernel
         state and that the OS has marked the kernel as good.
 
-        @param expected_kernel_state: kernel state that we are verifying with
+        @param expected_kernel: kernel that we are verifying with,
             i.e. I expect to be booted onto partition 4 etc. See output of
             get_kernel_state.
         @param rollback_message: string to raise as a ChromiumOSError
@@ -549,11 +549,10 @@
         @raises ChromiumOSError: If we didn't.
         """
         # Figure out the newly active kernel.
-        active_kernel_state = self.get_kernel_state()[0]
+        active_kernel = self.get_kernel_state()[0]
 
         # Check for rollback due to a bad build.
-        if (expected_kernel_state and
-                active_kernel_state != expected_kernel_state):
+        if active_kernel != expected_kernel:
 
             # Kernel crash reports should be wiped between test runs, but
             # may persist from earlier parts of the test, or from problems
@@ -585,8 +584,8 @@
         # Make sure chromeos-setgoodkernel runs.
         try:
             utils.poll_for_condition(
-                lambda: (self._get_kernel_tries(active_kernel_state) == 0
-                         and self._get_kernel_success(active_kernel_state)),
+                lambda: (self._get_kernel_tries(active_kernel) == 0
+                         and self._get_kernel_success(active_kernel)),
                 exception=ChromiumOSError(),
                 timeout=_KERNEL_UPDATE_TIMEOUT, sleep_interval=5)
         except ChromiumOSError:
@@ -601,15 +600,12 @@
                     'within %d seconds' % (event, _KERNEL_UPDATE_TIMEOUT))
 
 
-    def _install_update(self, update_root=True):
+    def _install_update(self):
         """Install the requested image on the DUT, but don't start it.
 
         This downloads all content needed for the requested update, and
         installs it in place on the DUT.  This does not reboot the DUT,
         so the update is merely pending when the function returns.
-
-        @param update_root: When true, force a rootfs update; otherwise
-                            update the stateful partition only.
         """
         booted_version = self.host.get_release_version()
         logging.info('Updating from version %s to %s.',
@@ -636,11 +632,7 @@
 
         try:
             try:
-                if not update_root:
-                    logging.info('Root update is skipped.')
-                else:
-                    self.update_image()
-
+                self.update_image()
                 self.update_stateful()
             except:
                 self._revert_boot_partition()
@@ -662,61 +654,6 @@
                          'sysinfo/update_engine dir. Check the lastest.')
 
 
-    def _check_version(self):
-        """Check the image running in DUT has the desired version.
-
-        @returns: True if the DUT's image version matches the version that
-            the autoupdater tries to update to.
-
-        """
-        booted_version = self.host.get_release_version()
-        return self.update_version.endswith(booted_version)
-
-
-    def _try_stateful_update(self):
-        """Try to use stateful update to initialize DUT.
-
-        When DUT is already running the same version that machine_install
-        tries to install, stateful update is a much faster way to clean up
-        the DUT for testing, compared to a full reimage. It is implemeted
-        by calling autoupdater._run_full_update, but skipping updating root,
-        as updating the kernel is time consuming and not necessary.
-
-        @param update_url: url of the image.
-        @param updater: ChromiumOSUpdater instance used to update the DUT.
-        @returns: True if the DUT was updated with stateful update.
-
-        """
-        self.host.prepare_for_update()
-
-        # TODO(jrbarnette):  Yes, I hate this re.match() test case.
-        # It's better than the alternative:  see crbug.com/360944.
-        image_name = url_to_image_name(self.update_url)
-        release_pattern = r'^.*-release/R[0-9]+-[0-9]+\.[0-9]+\.0$'
-        if not re.match(release_pattern, image_name):
-            return False
-        if not self._check_version():
-            return False
-        # Following folders should be rebuilt after stateful update.
-        # A test file is used to confirm each folder gets rebuilt after
-        # the stateful update.
-        folders_to_check = ['/var', '/home', '/mnt/stateful_partition']
-        test_file = '.test_file_to_be_deleted'
-        paths = [os.path.join(folder, test_file) for folder in folders_to_check]
-        self._run('touch %s' % ' '.join(paths))
-
-        self._install_update(update_root=False)
-
-        # Reboot to complete stateful update.
-        self.host.reboot(timeout=self.host.REBOOT_TIMEOUT, wait=True)
-
-        # After stateful update and a reboot, all of the test_files shouldn't
-        # exist any more. Otherwise the stateful update is failed.
-        return not any(
-            self.host.path_exists(os.path.join(folder, test_file))
-            for folder in folders_to_check)
-
-
     def _post_update_processing(self, expected_kernel):
         """After the DUT is updated, confirm machine_install succeeded.
 
@@ -746,7 +683,7 @@
             logging.debug('No autotest installed directory found.')
 
 
-    def run_update(self, force_full_update):
+    def run_update(self):
         """Perform a full update of a DUT in the test lab.
 
         This downloads and installs the root FS and stateful partition
@@ -755,9 +692,6 @@
         requirements for provisioning a DUT for testing the requested
         build.
 
-        @param force_full_update: When true, update the root file
-            system to the new build, even if the target DUT already has
-            that build installed.
         @returns A tuple of the form `(image_name, attributes)`, where
             `image_name` is the name of the image installed, and
             `attributes` is new attributes to be applied to the DUT.
@@ -773,51 +707,37 @@
         # removed by any successful update.
         self._run('touch %s' % PROVISION_FAILED)
 
-        update_complete = False
-        if not force_full_update:
-            try:
-                # If the DUT is already running the same build, try stateful
-                # update first as it's much quicker than a full re-image.
-                update_complete = self._try_stateful_update()
-            except Exception as e:
-                logging.exception(e)
+        self.host.reboot(timeout=self.host.REBOOT_TIMEOUT)
+        self.host.prepare_for_update()
 
-        inactive_kernel = None
-        if update_complete:
-            logging.info('Install complete without full update')
-        else:
-            logging.info('DUT requires full update.')
-            self.host.reboot(timeout=self.host.REBOOT_TIMEOUT, wait=True)
-            self.host.prepare_for_update()
+        self._install_update()
 
-            self._install_update()
+        # Give it some time in case of IO issues.
+        time.sleep(10)
 
-            # Give it some time in case of IO issues.
-            time.sleep(10)
+        inactive_kernel = self.get_kernel_state()[1]
+        next_kernel = self._get_next_kernel()
+        if next_kernel != inactive_kernel:
+            raise ChromiumOSError(
+                    'Update failed.  The kernel for next boot is %s, '
+                    'but %s was expected.' %
+                    (next_kernel['name'], inactive_kernel['name']))
 
-            inactive_kernel = self.get_kernel_state()[1]
-            next_kernel = self._get_next_kernel()
-            if next_kernel != inactive_kernel:
-                raise ChromiumOSError(
-                        'Update failed.  The kernel for next boot is %s, '
-                        'but %s was expected.' %
-                        (next_kernel['name'], inactive_kernel['name']))
-
-            # Update has returned successfully; reboot the host.
-            #
-            # Regarding the 'crossystem' command below: In some cases,
-            # the update flow puts the TPM into a state such that it
-            # fails verification.  We don't know why.  However, this
-            # call papers over the problem by clearing the TPM during
-            # the reboot.
-            #
-            # We ignore failures from 'crossystem'.  Although failure
-            # here is unexpected, and could signal a bug, the point of
-            # the exercise is to paper over problems; allowing this to
-            # fail would defeat the purpose.
-            self._run('crossystem clear_tpm_owner_request=1',
-                      ignore_status=True)
-            self.host.reboot(timeout=self.host.REBOOT_TIMEOUT, wait=True)
+        # Update has returned successfully; reboot the host.
+        #
+        # Regarding the 'crossystem' command below: In some cases,
+        # the update flow puts the TPM into a state such that it
+        # fails verification.  We don't know why.  However, this
+        # call papers over the problem by clearing the TPM during
+        # the reboot.
+        #
+        # We ignore failures from 'crossystem'.  Although failure
+        # here is unexpected, and could signal a bug, the point of
+        # the exercise is to paper over problems; allowing this to
+        # fail would defeat the purpose.
+        self._run('crossystem clear_tpm_owner_request=1',
+                  ignore_status=True)
+        self.host.reboot(timeout=self.host.REBOOT_TIMEOUT)
 
         self._post_update_processing(inactive_kernel)
         image_name = url_to_image_name(self.update_url)
diff --git a/server/cros/autoupdater_unittest.py b/server/cros/autoupdater_unittest.py
index 09f6f0a..a33ea94 100755
--- a/server/cros/autoupdater_unittest.py
+++ b/server/cros/autoupdater_unittest.py
@@ -27,332 +27,6 @@
                          expected_value)
 
 
-    def testCheckVersion_1(self):
-        """Test version check methods work for any build.
-
-        Test _check_version for:
-        1. trybot paladin build.
-        update version: trybot-lumpy-paladin/R27-3837.0.0-b123
-        booted version: 3837.0.2013_03_21_1340
-
-        """
-        update_url = ('http://172.22.50.205:8082/update/trybot-lumpy-paladin/'
-                      'R27-1111.0.0-b123')
-        updater = autoupdater.ChromiumOSUpdater(
-                update_url, host=self.mox.CreateMockAnything())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '1111.0.2013_03_21_1340')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '1111.0.0-rc1')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn('1111.0.0')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.0-pgo-generate')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-
-    def testCheckVersion_2(self):
-        """Test version check methods work for any build.
-
-        Test _check_version for:
-        1. trybot paladin build.
-        update version: trybot-lumpy-paladin/R27-3837.0.0-b123
-        booted version: 3837.0.2013_03_21_1340
-
-        2. trybot release build.
-        update version: trybot-lumpy-release/R27-3837.0.0-b456
-        booted version: 3837.0.0
-
-        """
-        update_url = ('http://172.22.50.205:8082/update/trybot-lumpy-release/'
-                      'R27-2222.0.0-b456')
-        updater = autoupdater.ChromiumOSUpdater(
-                update_url, host=self.mox.CreateMockAnything())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '2222.0.2013_03_21_1340')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '2222.0.0-rc1')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn('2222.0.0')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.0-pgo-generate')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-
-    def testCheckVersion_3(self):
-        """Test version check methods work for any build.
-
-        Test _check_version for:
-        3. buildbot official release build.
-        update version: lumpy-release/R27-3837.0.0
-        booted version: 3837.0.0
-
-        """
-        update_url = ('http://172.22.50.205:8082/update/lumpy-release/'
-                      'R27-3333.0.0')
-        updater = autoupdater.ChromiumOSUpdater(
-                update_url, host=self.mox.CreateMockAnything())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '3333.0.2013_03_21_1340')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '3333.0.0-rc1')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn('3333.0.0')
-        self.mox.ReplayAll()
-
-        self.assertTrue(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.0-pgo-generate')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-
-    def testCheckVersion_4(self):
-        """Test version check methods work for any build.
-
-        Test _check_version for:
-        4. non-official paladin rc build.
-        update version: lumpy-paladin/R27-3837.0.0-rc7
-        booted version: 3837.0.0-rc7
-
-        """
-        update_url = ('http://172.22.50.205:8082/update/lumpy-paladin/'
-                      'R27-4444.0.0-rc7')
-        updater = autoupdater.ChromiumOSUpdater(
-                update_url, host=self.mox.CreateMockAnything())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.2013_03_21_1340')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '4444.0.0-rc7')
-        self.mox.ReplayAll()
-
-        self.assertTrue(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn('4444.0.0')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.0-pgo-generate')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-
-    def testCheckVersion_5(self):
-        """Test version check methods work for any build.
-
-        Test _check_version for:
-        5. chrome-perf build.
-        update version: lumpy-chrome-perf/R28-3837.0.0-b2996
-        booted version: 3837.0.0
-
-        """
-        update_url = ('http://172.22.50.205:8082/update/lumpy-chrome-perf/'
-                      'R28-4444.0.0-b2996')
-        updater = autoupdater.ChromiumOSUpdater(
-                update_url, host=self.mox.CreateMockAnything())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.2013_03_21_1340')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '4444.0.0-rc7')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn('4444.0.0')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.0-pgo-generate')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-
-    def testCheckVersion_6(self):
-        """Test version check methods work for any build.
-
-        Test _check_version for:
-        6. pgo-generate build.
-        update version: lumpy-release-pgo-generate/R28-3837.0.0-b2996
-        booted version: 3837.0.0-pgo-generate
-
-        """
-        update_url = ('http://172.22.50.205:8082/update/lumpy-release-pgo-'
-                      'generate/R28-4444.0.0-b2996')
-        updater = autoupdater.ChromiumOSUpdater(
-                update_url, host=self.mox.CreateMockAnything())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.0-2013_03_21_1340')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '4444.0.0-rc7')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn('4444.0.0')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                                                    '4444.0.0-pgo-generate')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-
-    def testCheckVersion_7(self):
-        """Test version check methods work for a test-ap build.
-
-        Test _check_version for:
-        6. test-ap build.
-        update version: trybot-stumpy-test-ap/R46-7298.0.0-b23
-        booted version: 7298.0.0
-
-        """
-        update_url = ('http://100.107.160.2:8082/update/trybot-stumpy-test-api'
-                      '/R46-7298.0.0-b23')
-        updater = autoupdater.ChromiumOSUpdater(
-                update_url, host=self.mox.CreateMockAnything())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '7298.0.2015_07_24_1640')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '7298.0.2015_07_24_1640')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn('7298.0.0')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-        self.mox.UnsetStubs()
-        self.mox.StubOutWithMock(updater.host, 'get_release_version')
-        updater.host.get_release_version().MultipleTimes().AndReturn(
-                '7298.0.0')
-        self.mox.ReplayAll()
-
-        self.assertFalse(updater._check_version())
-
-
     def _host_run_for_update(self, cmd, exception=None,
                              bad_update_status=False):
         """Helper function for AU tests.
diff --git a/server/hosts/cros_host.py b/server/hosts/cros_host.py
index 20605b6..c023ae0 100644
--- a/server/hosts/cros_host.py
+++ b/server/hosts/cros_host.py
@@ -723,27 +723,11 @@
         pass
 
 
-    def machine_install(self, update_url, force_full_update=False):
-        """Install the DUT.
+    def machine_install(self, update_url):
+        """Install the image at `update_url` onto the DUT.
 
-        Use stateful update if the DUT is already running the same build.
-        Stateful update does not update kernel and tends to run much faster
-        than a full reimage. If the DUT is running a different build, or it
-        failed to do a stateful update, full update, including kernel update,
-        will be applied to the DUT.
-
-        Once a host enters machine_install its host attribute job_repo_url
-        (used for package install) will be removed and then updated.
-
-        @param update_url: The url to use for the update
-                pattern: http://$devserver:###/update/$build
-                If update_url is None and repair is True we will install the
-                stable image listed in afe_stable_versions table. If the table
-                is not setup, global_config value under CROS.stable_cros_version
-                will be used instead.
-        @param force_full_update: If True, do not attempt to run stateful
-                update, force a full reimage. If False, try stateful update
-                first when the dut is already installed with the same version.
+        @param update_url: The url used to identify the update image on the
+                devserver.
         @raises autoupdater.ChromiumOSError
 
         @returns A tuple of (image_name, host_attributes).
@@ -756,7 +740,7 @@
                 autotest packages.
         """
         updater = autoupdater.ChromiumOSUpdater(update_url, host=self)
-        return updater.run_update(force_full_update)
+        return updater.run_update()
 
 
     def _clear_fw_version_labels(self, rw_only):
diff --git a/server/site_tests/autoupdate_Rollback/autoupdate_Rollback.py b/server/site_tests/autoupdate_Rollback/autoupdate_Rollback.py
index cf49622..8fc2ef1 100755
--- a/server/site_tests/autoupdate_Rollback/autoupdate_Rollback.py
+++ b/server/site_tests/autoupdate_Rollback/autoupdate_Rollback.py
@@ -57,8 +57,7 @@
 
         # We should be booting from the new partition.
         error_message = 'Failed to set up test by updating DUT.'
-        updater.verify_boot_expectations(expected_kernel_state=updated_kernel,
-                                         rollback_message=error_message)
+        updater.verify_boot_expectations(updated_kernel, error_message)
 
         if powerwash_before_rollback:
             self._powerwash(host)
@@ -71,6 +70,5 @@
         # We should be back on our initial partition.
         error_message = ('Autoupdate reported that rollback succeeded but we '
                          'did not boot into the correct partition.')
-        updater.verify_boot_expectations(expected_kernel_state=initial_kernel,
-                                         rollback_message=error_message)
+        updater.verify_boot_expectations(initial_kernel, error_message)
         logging.info('We successfully rolled back to initial kernel.')