From ebdf8a95b74666a7035c9b8ea1b3c8234f28b3ae Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Thu, 18 May 2023 12:15:27 -0300 Subject: [PATCH] ci/lava: Force LAVA panfrost jobs to use UART To ensure proper SSH functioning, the device IP should be added to the LAVA device dictionary by setting device_ip. LAVA will then map the value to lava-target-ip. meson-g12b-a311d-khadas-vim3-cbg-4 has an IP in the dictionary, while sun50i-h6-pine-h64-cbg-1 and meson-g12b-a311d-khadas-vim3-cbg-2 do not. Since some devices are not yet properly configured, and device tag fixing is not an option here, let's temporarily switch to a job definition based on UART, until it gets fixed. Signed-off-by: Guilherme Gallo Part-of: --- .gitlab-ci/lava/utils/lava_job_definition.py | 25 +++++++++++++------- src/panfrost/ci/gitlab-ci.yml | 6 +++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci/lava/utils/lava_job_definition.py b/.gitlab-ci/lava/utils/lava_job_definition.py index 55dbb902dac..8ac30d891c5 100644 --- a/.gitlab-ci/lava/utils/lava_job_definition.py +++ b/.gitlab-ci/lava/utils/lava_job_definition.py @@ -19,6 +19,22 @@ NUMBER_OF_ATTEMPTS_LAVA_BOOT = int(getenv("LAVA_NUMBER_OF_ATTEMPTS_LAVA_BOOT", 3 JOB_PRIORITY = int(getenv("LAVA_JOB_PRIORITY", 75)) +def has_ssh_support(job_submitter: "LAVAJobSubmitter") -> bool: + force_uart = bool(getenv("LAVA_FORCE_UART", False)) + + if force_uart: + return False + + # Only Collabora's farm supports to run docker container as a LAVA actions, + # which is required to follow the job in a SSH section + current_farm = get_lava_farm() + + # SSH job definition still needs to add support for fastboot. + job_uses_fastboot: bool = job_submitter.boot_method == "fastboot" + + return current_farm == LavaFarm.COLLABORA and not job_uses_fastboot + + def generate_lava_yaml_payload(job_submitter: "LAVAJobSubmitter") -> dict[str, Any]: """ Bridge function to use the supported job definition depending on some Mesa @@ -35,14 +51,7 @@ def generate_lava_yaml_payload(job_submitter: "LAVAJobSubmitter") -> dict[str, A generate_lava_yaml_payload as uart_lava_yaml, ) - # Only Collabora's farm supports to run docker container as a LAVA actions, - # which is required to follow the job in a SSH section - current_farm = get_lava_farm() - - # SSH job definition still needs to add support for fastboot. - job_uses_fastboot: bool = job_submitter.boot_method == "fastboot" - - if current_farm == LavaFarm.COLLABORA and not job_uses_fastboot: + if has_ssh_support(job_submitter): return ssh_lava_yaml(job_submitter) return uart_lava_yaml(job_submitter) diff --git a/src/panfrost/ci/gitlab-ci.yml b/src/panfrost/ci/gitlab-ci.yml index 4b3815b20ef..85a848a85d7 100644 --- a/src/panfrost/ci/gitlab-ci.yml +++ b/src/panfrost/ci/gitlab-ci.yml @@ -39,6 +39,9 @@ panfrost-t720-gles2:arm64: DEQP_SUITE: panfrost-t720 FDO_CI_CONCURRENT: 6 RUNNER_TAG: mesa-ci-x86-64-lava-sun50i-h6-pine-h64 + # This device network setup is incomplete, so we can't use it for the LAVA + # SSH session. Need to fallback to the serial console. + LAVA_FORCE_UART: 1 # We only have two machines, which we share with KernelCI. # Keep the second t760 job manual. @@ -102,6 +105,9 @@ panfrost-t860-egl:arm64: DTB: $DEVICE_TYPE GPU_VERSION: panfrost-g52 RUNNER_TAG: mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3 + # This device network setup is incomplete, so we can't use it for the LAVA + # SSH session. Need to fallback to the serial console. + LAVA_FORCE_UART: 1 panfrost-g52-gl:arm64: parallel: 3