From ce01d96402be797749b6f423450cb5f8672dbf36 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 2 Apr 2024 15:17:36 +0200 Subject: [PATCH] llext: add a relocatable extension test to Xtensa LLEXT on Xtensa now supports both shared and relocatable (partially linked) extensions. This commit adds a copy of the LLEXT test for the relocatable case. Signed-off-by: Luca Burelli Signed-off-by: Guennadi Liakhovetski --- tests/subsys/llext/simple/src/test_llext_simple.c | 2 ++ tests/subsys/llext/simple/testcase.yaml | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/tests/subsys/llext/simple/src/test_llext_simple.c b/tests/subsys/llext/simple/src/test_llext_simple.c index 90fadb68f12..e45c7fd61b3 100644 --- a/tests/subsys/llext/simple/src/test_llext_simple.c +++ b/tests/subsys/llext/simple/src/test_llext_simple.c @@ -219,6 +219,7 @@ static LLEXT_CONST uint8_t object_ext[] __aligned(4) = { }; LLEXT_LOAD_UNLOAD(object, true, NULL) +#ifndef CONFIG_LLEXT_TYPE_ELF_RELOCATABLE static LLEXT_CONST uint8_t syscalls_ext[] __aligned(4) = { #include "syscalls.inc" }; @@ -228,6 +229,7 @@ static LLEXT_CONST uint8_t threads_kernel_objects_ext[] __aligned(4) = { #include "threads_kernel_objects.inc" }; LLEXT_LOAD_UNLOAD(threads_kernel_objects, true, threads_objects_perm_setup) +#endif #endif /* ! LOADER_BUILD_ONLY */ diff --git a/tests/subsys/llext/simple/testcase.yaml b/tests/subsys/llext/simple/testcase.yaml index 2a90bd1fadb..472596e357d 100644 --- a/tests/subsys/llext/simple/testcase.yaml +++ b/tests/subsys/llext/simple/testcase.yaml @@ -55,6 +55,17 @@ tests: - CONFIG_MODULES=y - CONFIG_LLEXT_STORAGE_WRITABLE=y - CONFIG_LLEXT_TEST_HELLO=m + llext.simple.modules_enabled_writable_relocatable: + arch_exclude: arm arm64 + filter: not CONFIG_MPU and not CONFIG_MMU + platform_key: + - simulation + - arch + extra_configs: + - CONFIG_MODULES=y + - CONFIG_LLEXT_STORAGE_WRITABLE=y + - CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y + - CONFIG_LLEXT_TEST_HELLO=m llext.simple.modules_enabled_readonly: filter: not CONFIG_MPU and not CONFIG_MMU arch_exclude: xtensa # for now