Kernel rollback FAFT test to check verified boot and TPM functionality.
This test requires a USB disk plugged-in, which contains a Chrome OS test
image (built by "build_image --test"). In normal mode, this test rollbacks
kernel A and results kernel B boot. It then rollbacks kernel B and
results recovery boot. In developer mode, the firmware ignores kernel
rollback check so it remains unchanged.
BUG=chromium-os:19710
TEST=tested on Alex and Stumpy
$ run_remote_tests.sh --remote=$REMOTE_IP -a "xml_config=$OVERLAY_XML \
servo_serial=$SERIAL" firmware_RollbackKernel/control$
Change-Id: I0623165e2de9a3c8d783796ab230d831fa806f42
Reviewed-on: https://gerrit.chromium.org/gerrit/15480
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index d047205..5696ddc 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -87,7 +87,7 @@
# Delay between passing firmware screen and text mode warning screen.
TEXT_SCREEN_DELAY = 20
# Delay of loading the USB kernel.
- USB_LOAD_DELAY = 5
+ USB_LOAD_DELAY = 10
# Delay between USB plug-out and plug-in.
USB_PLUG_DELAY = 10
# Delay after running the 'sync' command.
@@ -405,6 +405,20 @@
return True
+ def check_root_part_on_non_recovery(self, part):
+ """Check the partition number of root device and on normal/dev boot.
+
+ Returns:
+ True if the root device matched and on normal/dev boot;
+ otherwise, False.
+ """
+ return self.root_part_checker(part) and \
+ self.crossystem_checker({
+ 'mainfw_type': ('normal', 'developer'),
+ 'recoverysw_boot': '0',
+ })
+
+
def _join_part(self, dev, part):
"""Return a concatenated string of device and partition number.