llext: rework test and sample coverage

This patch reworks the testcase.yaml and sample.yaml files for the llext
subsystem to further reduce the number of tests performed by CI while
improving overall coverage.

The following changes are introduced by this commit:

- Remove the arch_allow field from the common section to allow any arch
  to be tested in the build_only test. All other tests explicitly narrow
  down the arches they are applicable to.
- In addition to platforms with active issues, also exclude a number of
  platforms that are always skipped by the runtime filter due to
  RAM/Flash limitations.
- Add integration_platforms to limit the test count to a few selected
  platforms which are representative of the different arches.
- Remove a number of duplicate SLID tests and group them into a single
  test that covers both ARM and Xtensa architectures.
- Test the relocatable case on ARM as well.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
Luca Burelli 2024-06-18 19:08:35 +02:00 committed by Anas Nashif
parent 6c5983492b
commit cec4be3a84
3 changed files with 81 additions and 36 deletions

View File

@ -4,23 +4,38 @@ common:
- arm
- xtensa
platform_exclude:
# platforms with active issues
- apollo4p_evb # See #73443
- apollo4p_blue_kxr_evb # See #73443
- numaker_pfm_m487 # See #63167
- s32z2xxdc2/s32z270/rtu0 # See commit 18a0660
- s32z2xxdc2/s32z270/rtu1 # See commit 18a0660
# platforms that are always skipped by the runtime filter
- qemu_arc/qemu_arc_em
- qemu_arc/qemu_arc_hs
- qemu_arc/qemu_arc_hs/xip
- qemu_arc/qemu_arc_hs5x
- qemu_arc/qemu_arc_hs6x
- qemu_cortex_m0
- qemu_xtensa/dc233c/mmu
integration_platforms:
- qemu_xtensa
- qemu_cortex_r5
- mps2/an385
- qemu_cortex_a9 # ARM Cortex-A9 (ARMv7-A ISA)
- qemu_cortex_r5 # ARM Cortex-R5 (ARMv7-R ISA)
- mps2/an385 # ARM Cortex-M3 (ARMv7-M ISA)
- mps2/an521/cpu0 # ARM Cortex-M33 (ARMv8-M ISA)
harness: console
sample:
name: CONFIG_MODULES test
description: Call code directly and from extensions
tests:
sample.llext.modules.module_build:
filter: not CONFIG_MPU and not CONFIG_MMU and not CONFIG_SOC_SERIES_S32ZE
extra_configs:
- CONFIG_HELLO_WORLD_MODE=m
- arch:arm:CONFIG_ARM_MPU=n
- arch:arm:CONFIG_ARM_AARCH32_MMU=n
- CONFIG_HELLO_WORLD_MODE=m
harness_config:
type: one_line
regex:

View File

@ -1,17 +1,32 @@
common:
tags: llext
tags: shell llext
arch_allow:
- arm
- xtensa
filter: not CONFIG_MPU and not CONFIG_MMU and not CONFIG_SOC_SERIES_S32ZE
platform_exclude:
- numaker_pfm_m487 # See #63167
# platforms with active issues
- apollo4p_evb # See #73443
- apollo4p_blue_kxr_evb # See #73443
- numaker_pfm_m487 # See #63167
- s32z2xxdc2/s32z270/rtu0 # See commit 18a0660
- s32z2xxdc2/s32z270/rtu1 # See commit 18a0660
# platforms that are always skipped by the runtime filter
- qemu_arc/qemu_arc_em
- qemu_arc/qemu_arc_hs
- qemu_arc/qemu_arc_hs/xip
- qemu_arc/qemu_arc_hs5x
- qemu_arc/qemu_arc_hs6x
- qemu_cortex_m0
- qemu_xtensa/dc233c/mmu
sample:
description: Loadable extensions with shell sample
name: Extension loader shell
tests:
sample.llext.shell:
tags: shell llext
harness: keyboard
extra_configs:
- arch:arm:CONFIG_ARM_MPU=n
- arch:arm:CONFIG_ARM_AARCH32_MMU=n

View File

@ -1,12 +1,25 @@
common:
tags: llext
arch_allow:
- arm
- xtensa
platform_exclude:
# platforms with active issues
- apollo4p_evb # See #73443
- apollo4p_blue_kxr_evb # See #73443
- numaker_pfm_m487 # See #63167
- s32z2xxdc2/s32z270/rtu0 # See commit 18a0660
- s32z2xxdc2/s32z270/rtu1 # See commit 18a0660
# platforms that are always skipped by the runtime filter
- qemu_arc/qemu_arc_em
- qemu_arc/qemu_arc_hs
- qemu_arc/qemu_arc_hs/xip
- qemu_arc/qemu_arc_hs5x
- qemu_arc/qemu_arc_hs6x
- qemu_cortex_m0
- qemu_xtensa/dc233c/mmu
integration_platforms:
- qemu_cortex_a9 # ARM Cortex-A9 (ARMv7-A ISA)
- qemu_cortex_r5 # ARM Cortex-R5 (ARMv7-R ISA)
- mps2/an385 # ARM Cortex-M3 (ARMv7-M ISA)
- mps2/an521/cpu0 # ARM Cortex-M33 (ARMv8-M ISA)
tests:
# While there is in practice no value in compiling subsys/llext/*.c
@ -15,61 +28,63 @@ tests:
# future.
llext.simple.loader_build:
build_only: true
# How to override the above and allow ANY arch?
arch_allow: arm arm64 x86 x86_64 xtensa posix
# Run the suite with all combinations of core Kconfig options for the llext
# subsystem (storage type, ELF type, MPU/MMU etc)
llext.simple.readonly:
arch_exclude: xtensa # for now
arch_allow: arm # Xtensa needs writable storage
filter: not CONFIG_MPU and not CONFIG_MMU and not CONFIG_SOC_SERIES_S32ZE
extra_configs:
- arch:arm:CONFIG_ARM_MPU=n
- arch:arm:CONFIG_ARM_AARCH32_MMU=n
- CONFIG_LLEXT_STORAGE_WRITABLE=n
llext.simple.readonly_mpu:
min_ram: 128
arch_exclude: xtensa # for now
arch_allow: arm # Xtensa needs writable storage
filter: CONFIG_ARCH_HAS_USERSPACE
extra_configs:
- CONFIG_USERSPACE=y
- CONFIG_LLEXT_STORAGE_WRITABLE=n
llext.simple.writable:
arch_allow: arm xtensa
integration_platforms:
- qemu_xtensa # Xtensa ISA
filter: not CONFIG_MPU and not CONFIG_MMU and not CONFIG_SOC_SERIES_S32ZE
extra_configs:
- arch:arm:CONFIG_ARM_MPU=n
- arch:arm:CONFIG_ARM_AARCH32_MMU=n
- CONFIG_LLEXT_STORAGE_WRITABLE=y
llext.simple.writable_relocatable:
arch_exclude: arm arm64
filter: not CONFIG_MPU and not CONFIG_MMU
arch_allow: arm xtensa
integration_platforms:
- qemu_xtensa
extra_configs:
- CONFIG_LLEXT_STORAGE_WRITABLE=y
- CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y
llext.simple.readonly_slid_linking:
arch_exclude: xtensa # for now
filter: not CONFIG_MPU and not CONFIG_MMU and not CONFIG_SOC_SERIES_S32ZE
- qemu_xtensa # Xtensa ISA
filter: not CONFIG_MPU and not CONFIG_MMU
extra_configs:
- arch:arm:CONFIG_ARM_MPU=n
- CONFIG_LLEXT_STORAGE_WRITABLE=n
- CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID=y
llext.simple.readonly_mpu_slid_linking:
min_ram: 128
arch_exclude: xtensa # for now
filter: CONFIG_ARCH_HAS_USERSPACE
extra_configs:
- CONFIG_USERSPACE=y
- CONFIG_LLEXT_STORAGE_WRITABLE=n
- CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID=y
- arch:arm:CONFIG_ARM_AARCH32_MMU=n
- CONFIG_LLEXT_STORAGE_WRITABLE=y
- CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y
# Test the Symbol Link Identifier (SLID) linking feature on writable
# storage to cover both ARM and Xtensa architectures on the same test.
llext.simple.writable_slid_linking:
arch_allow: arm xtensa
integration_platforms:
- qemu_xtensa # Xtensa ISA
filter: not CONFIG_MPU and not CONFIG_MMU and not CONFIG_SOC_SERIES_S32ZE
extra_configs:
- arch:arm:CONFIG_ARM_MPU=n
- arch:arm:CONFIG_ARM_AARCH32_MMU=n
- CONFIG_LLEXT_STORAGE_WRITABLE=y
- CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID=y
llext.simple.writable_relocatable_slid_linking:
arch_exclude: arm arm64
filter: not CONFIG_MPU and not CONFIG_MMU
arch_allow: arm xtensa
integration_platforms:
- qemu_xtensa
- qemu_xtensa # Xtensa ISA
filter: not CONFIG_MPU and not CONFIG_MMU
extra_configs:
- arch:arm:CONFIG_ARM_MPU=n
- arch:arm:CONFIG_ARM_AARCH32_MMU=n
- CONFIG_LLEXT_STORAGE_WRITABLE=y
- CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y
- CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID=y