vboot2: adjust expectation based on the new firmware selection behavior
vboot2 selects firmware based on fw_try_next value and continues to use the slot
until the next update. Autoupdate uses whichever inactive slot to try out a new
image while vboot1 always writes a new image to slot B.
TEST=Ran firmware_* tests against Blaze with USE=+/-vboot2.
BUG=none
BRANCH=none
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I586235bcc5ca52282fe9652b51e5dd311b4fac4c
Reviewed-on: https://chromium-review.googlesource.com/205988
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
diff --git a/client/cros/faft/rpc_functions.py b/client/cros/faft/rpc_functions.py
index 1146f84..fe70001 100755
--- a/client/cros/faft/rpc_functions.py
+++ b/client/cros/faft/rpc_functions.py
@@ -255,6 +255,14 @@
"""Set 'Try Frimware B' flag in crossystem."""
self._chromeos_interface.cs.fwb_tries = 1
+ def _system_set_fw_try_next(self, next):
+ """Set fw_try_next to A or B"""
+ self._chromeos_interface.cs.fw_try_next = next
+
+ def _system_get_fw_vboot2(self):
+ """Get fw_vboot2"""
+ return self._chromeos_interface.cs.fw_vboot2 == '1'
+
def _system_request_recovery_boot(self):
"""Request running in recovery mode on the restart."""
self._chromeos_interface.cs.request_recovery()