fingerprint: Sync filesys after copying fw files to DUT

We have seen cases where the fw files are intact when first copied to
DUT, but becomes empty (size is zero) after a reboot, so do a sync
after copying files to DUT.

BUG=b:171238402
TEST=flash new OS image on lab DUT, then run firmware_Fingerprint.RDP0
	(on Morphius) => Pass

Change-Id: If08c5ab6b9eab66cfaf9a7bec8bd0c9a49a24438
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2490206
Tested-by: Yicheng Li <yichengli@chromium.org>
Auto-Submit: Yicheng Li <yichengli@chromium.org>
Commit-Queue: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
(cherry picked from commit eac4fcbecf260761960424d11b14c4be81443ec1)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2495997
Commit-Queue: Yicheng Li <yichengli@chromium.org>
diff --git a/server/cros/faft/fingerprint_test.py b/server/cros/faft/fingerprint_test.py
index 2ad69ac..28da99c 100644
--- a/server/cros/faft/fingerprint_test.py
+++ b/server/cros/faft/fingerprint_test.py
@@ -884,6 +884,8 @@
         """Copies files from server to DUT."""
         logging.info('Copying files from (%s) to (%s).', src_dir, dst_dir)
         self.host.send_file(src_dir, dst_dir, delete_dest=True)
+        # Sync the filesystem in case we need to reboot the AP soon.
+        self.run_cmd('sync')
 
     def run_server_cmd(self, command, timeout=60):
         """Runs command on server; return result with output and exit code."""