From daf1df9b706faa0c30f5388c329502276e23b23b Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Tue, 19 Sep 2023 11:46:36 +0530 Subject: [PATCH] ci/bare-metal: correct workaround for R8152 issue while retrieving TFTP data 1. Move block used for detecting R8152 problems to the bootloader phase where it belongs. Also remove requirement to 100 failures and just retry immediatelly. 2. Consider job failed after 10 errors, not 100. From the logs on cheza-14, ~ 30 errors is enough to fail. Signed-off-by: David Heidelberg Part-of: --- .gitlab-ci/bare-metal/cros_servo_run.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci/bare-metal/cros_servo_run.py b/.gitlab-ci/bare-metal/cros_servo_run.py index f67bc06ca2c..849017c3b1b 100755 --- a/.gitlab-ci/bare-metal/cros_servo_run.py +++ b/.gitlab-ci/bare-metal/cros_servo_run.py @@ -1,4 +1,3 @@ - #!/usr/bin/env python3 # # Copyright © 2020 Google LLC @@ -63,6 +62,7 @@ class CrosServoRun: self.ec_write("reboot\n") bootloader_done = False + tftp_failures = 0 # This is emitted right when the bootloader pauses to check for input. # Emit a ^N character to request network boot, because we don't have a # direct-to-netboot firmware on cheza. @@ -72,6 +72,17 @@ class CrosServoRun: bootloader_done = True break + # The Cheza firmware seems to occasionally get stuck looping in + # this error state during TFTP booting, possibly based on amount of + # network traffic around it, but it'll usually recover after a + # reboot. Currently mostly visible on google-freedreno-cheza-14. + if re.search("R8152: Bulk read error 0xffffffbf", line): + tftp_failures += 1 + if tftp_failures >= 10: + self.print_error( + "Detected intermittent tftp failure, restarting run...") + return 2 + # If the board has a netboot firmware and we made it to booting the # kernel, proceed to processing of the test run. if re.search("Booting Linux", line): @@ -90,22 +101,10 @@ class CrosServoRun: print("Failed to make it through bootloader, restarting run...") return 2 - tftp_failures = 0 for line in self.cpu_ser.lines(timeout=self.test_timeout, phase="test"): if re.search("---. end Kernel panic", line): return 1 - # The Cheza firmware seems to occasionally get stuck looping in - # this error state during TFTP booting, possibly based on amount of - # network traffic around it, but it'll usually recover after a - # reboot. - if re.search("R8152: Bulk read error 0xffffffbf", line): - tftp_failures += 1 - if tftp_failures >= 100: - self.print_error( - "Detected intermittent tftp failure, restarting run...") - return 2 - # There are very infrequent bus errors during power management transitions # on cheza, which we don't expect to be the case on future boards. if re.search("Kernel panic - not syncing: Asynchronous SError Interrupt", line):