faft: Corrupt the active RW slot for EC EFS
There are 2 RW sections for EC EFS. Change the corruption code to
corrupt the active RW slot, instead of A, to verify the software
sync behavior.
The scenarios:
* non-EFS: Corrupt A, software sync to A, reboot to A
* EFS-A-boot: Corrupt A, software sync to B, reboot to B
* EFS-B-boot: Corrupt B, software sync to A, reboot to A
BUG=b:69921268
TEST=Ran the modified firmware_SoftwareSync on both Fizz (EFS) and
Soraka (non-EFS).
Change-Id: Ibc870b8918343f03252a6b7342498ad95a96e75d
Reviewed-on: https://chromium-review.googlesource.com/817537
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
diff --git a/server/cros/servo/servo.py b/server/cros/servo/servo.py
index 314b10e..9410452 100644
--- a/server/cros/servo/servo.py
+++ b/server/cros/servo/servo.py
@@ -461,6 +461,11 @@
raise
+ def get_ec_active_copy(self):
+ """Get the active copy of the EC image."""
+ return self.get('ec_active_copy')
+
+
def _get_xmlrpclib_exception(self, xmlexc):
"""Get meaningful exception string from xmlrpc.