component_UpdateFlash: fix architecture check.

This wasn't working properly on alex and could probably be broken on
mixed ARM archs as well in the future.

TEST=desktopui_FlashSanityCheck.verify-system-flash on alex and samus
BUG=chromium:637346

Change-Id: I333634475ffb75e95307f6bba9bed2e947994bed
Reviewed-on: https://chromium-review.googlesource.com/418512
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
(cherry picked from commit b28d76bea7a9ca27834106cb34493b86d1d7173e)
Reviewed-on: https://chromium-review.googlesource.com/418866
diff --git a/client/site_tests/desktopui_FlashSanityCheck/desktopui_FlashSanityCheck.py b/client/site_tests/desktopui_FlashSanityCheck/desktopui_FlashSanityCheck.py
index d3a4019e..47f4a34 100755
--- a/client/site_tests/desktopui_FlashSanityCheck/desktopui_FlashSanityCheck.py
+++ b/client/site_tests/desktopui_FlashSanityCheck/desktopui_FlashSanityCheck.py
@@ -84,13 +84,16 @@
             if not 'dynamically linked' in output:
                 logging.error(output)
                 raise error.TestFail('Failed: Flash not dynamically linked.')
-            cpu_arch = utils.get_cpu_arch()
-            if cpu_arch == 'arm' and not 'ARM' in output:
+            arch = utils.get_arch_userspace()
+            logging.info('get_arch_userspace = %s', arch)
+            if arch == 'arm' and not 'ARM' in output:
                 logging.error(output)
                 raise error.TestFail('Failed: Flash binary not for ARM.')
-            if cpu_arch == 'x86_64' and not 'x86-64' in output:
-                raise error.TestFail('Failed: Flash binary not for x86-64.')
-            if cpu_arch == 'i386' and not '80386' in output:
+            if arch == 'x86_64' and not 'x86-64' in output:
+                logging.error(output)
+                raise error.TestFail('Failed: Flash binary not for x86_64.')
+            if arch == 'i386' and not '80386' in output:
+                logging.error(output)
                 raise error.TestFail('Failed: Flash binary not for i386.')
         logging.info('Verified file %s', name)
 
diff --git a/server/site_tests/component_UpdateFlash/component_UpdateFlash.py b/server/site_tests/component_UpdateFlash/component_UpdateFlash.py
index 762a28a..a845c63 100644
--- a/server/site_tests/component_UpdateFlash/component_UpdateFlash.py
+++ b/server/site_tests/component_UpdateFlash/component_UpdateFlash.py
@@ -57,6 +57,7 @@
 
     def cleanup(self):
         """Leaves this test without a component Flash installed."""
+        logging.info('+++++ Cleaning DUT for other tests +++++')
         self._delete_component()
 
     def run_once(self, host):
@@ -65,6 +66,7 @@
         self.autotest_client = autotest.Autotest(self.host)
         # Paranoia: by rebooting the DUT we protect this test from other tests
         # leaving running webservers behind.
+        logging.info('+++++ Rebooting DUT on start to reduce flakes +++++')
         self._reboot()
         # Test Flash once with whatever was the default on the DUT.
         self._run_flash_sanity()