Re: [PATCH xenomai-images v2 4/4] ci: run ci tests on StarFive VisionFive2

Tobias Schaffner <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Hi Jan,

On 5/5/26 18:37, Jan Kiszka wrote:
> On 05.05.26 11:06, Tobias Schaffner wrote:
>> Add CI/LAVA build and test jobs for hardware testing on the
>> StarFive VisionFive2 board.
>>
>> Signed-off-by: Tobias Schaffner <[email protected]>
>> ---
>>   ci/lib/gitlab-ci-base.yml                   | 21 +++++++
>>   ci/lib/kernel/head.yml                      | 13 ++++
>>   tests/jobs/xenomai-starfive-visionfive2.yml | 69 +++++++++++++++++++++
>>   3 files changed, 103 insertions(+)
>>   create mode 100644 tests/jobs/xenomai-starfive-visionfive2.yml
>>
>> diff --git a/ci/lib/gitlab-ci-base.yml b/ci/lib/gitlab-ci-base.yml
>> index aaeb778..e297f54 100644
>> --- a/ci/lib/gitlab-ci-base.yml
>> +++ b/ci/lib/gitlab-ci-base.yml
>> @@ -227,3 +227,24 @@ default:
>>     resource_group: board-x86-64-efi
>>     variables:
>>       TARGET: x86-64-efi
>> +
>> +.build:starfive-visionfive2:
>> +  extends: .build
>> +  variables:
>> +    TARGET: starfive-visionfive2
>> +    CACHE_ARCH: riscv64
>> +  rules:
>> +    - if: '$XENOMAI_VERSION != "4-next"'
>> +      when: never
>> +    - when: always
>> +
>> +.lava-test:starfive-visionfive2:
>> +  extends: .test
>> +  resource_group: board-starfive-visionfive2
>> +  variables:
>> +    TARGET: starfive-visionfive2
>> +    EVL_TESTS_SKIP_PATTERN: "ptrace-sync"
>> +  rules:
>> +    - if: '$XENOMAI_VERSION != "4-next"'
>> +      when: never
>> +    - if: '$LAVA_TESTS_ENABLED == "true"'
>> diff --git a/ci/lib/kernel/head.yml b/ci/lib/kernel/head.yml
>> index e2884c2..e5af966 100644
>> --- a/ci/lib/kernel/head.yml
>> +++ b/ci/lib/kernel/head.yml
>> @@ -61,6 +61,19 @@ lava-test-head:qemu-riscv64:
>>     variables:
>>       KERNEL_VERSION: "head"
>>   
>> +build-head:starfive-visionfive2:
>> +  extends: .build:starfive-visionfive2
>> +  variables:
>> +    LINUX_BUILD_OPTION: ":kas/opt/linux-head.yaml"
>> +    KERNEL_VERSION: "head"
>> +    CACHE_KERNEL: evl
>> +
>> +lava-test-head:starfive-visionfive2:
>> +  needs: [ "build-head:starfive-visionfive2" ]
>> +  extends: .lava-test:starfive-visionfive2
>> +  variables:
>> +    KERNEL_VERSION: "head"
>> +
>>   build-head:rpi4:
>>     extends: .build:rpi4
>>     variables:
>> diff --git a/tests/jobs/xenomai-starfive-visionfive2.yml b/tests/jobs/xenomai-starfive-visionfive2.yml
>> new file mode 100644
>> index 0000000..6155fdf
>> --- /dev/null
>> +++ b/tests/jobs/xenomai-starfive-visionfive2.yml
>> @@ -0,0 +1,69 @@
>> +#
>> +# Xenomai Real-Time System
>> +#
>> +# Copyright (c) Siemens AG, 2026
>> +#
>> +# Authors:
>> +#  Tobias Schaffner <[email protected]>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +job_name: xenomai-test-suite
>> +device_type: starfive-visionfive2
>> +
>> +timeouts:
>> +  job:
>> +    minutes: 90
>> +  action:
>> +    minutes: 65
>> +  connection:
>> +    minutes: 5
>> +priority: medium
>> +visibility: public
>> +
>> +metadata:
>> +  docs-source: xenomai-starfive-visionfive2
>> +  docs-filename: pipeline-xenomai-starfive-visionfive2
>> +# ACTION_BLOCK
>> +actions:
>> +- deploy:
>> +    timeout:
>> +      minutes: 30
>> +    to: tftp
>> +    kernel:
>> +      url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}-vmlinux
>> +      type: image
>> +    dtb:
>> +      url: ${DEPLOY_URL}/jh7110-starfive-visionfive-2-v1.2a.dtb
> 
> So, this only supports the old v1.2a, and I assume we need to be exact
> here. Maybe name the test file accordingly so that it is clear which
> hardware needs to be wired up?

Generally, a good idea to reflect this in the name. Unfortunately, the
test file is selected using the TARGET variable when scripts/run-lava-tests.sh
is called in ci/lib/gitlab-ci-base.yml, which is also used to choose
the machine configuration.

I will add a note to the test file and also mention this in the commit
message. Hopefully, that will make it clear enough, and someone will
come across this information when the board is replaced in the future.

>> +    nfsrootfs:
>> +      url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}.tar.gz
>> +      compression: gz
>> +#  BOOT_BLOCK
>> +- boot:
>> +    failure_retry: 3
>> +    timeout:
>> +      minutes: 5
>> +    method: u-boot
>> +    commands: nfs
>> +    prompts: ["root@demo:"]
>> +    auto_login:
>> +      login_prompt: 'demo login:'
>> +      username: root
>> +      password_prompt: 'Password:'
>> +      password: root
>> +
>> +- test:
>> +    timeout:
>> +      minutes: ${TEST_TIMEOUT_MINUTES}
>> +    definitions:
>> +    - repository:
>> +        metadata:
>> +          format: Lava-Test Test Definition 1.0
>> +          name: xenomai-test-suite
>> +          description: "runs the xenomai test suite"
>> +        run:
>> +          steps:
>> +            - ${TEST_COMMAND} || lava-test-raise "xenomai-test failed!"
>> +      from: inline
>> +      path: inline/xenomai-test-suite.yaml
>> +      name: xenomai-test-suite
> 
> Jan
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.