From df0805618bdf58a072514e042c809989c0fb020d Mon Sep 17 00:00:00 2001 From: El Mehdi YOUNES Date: Thu, 22 May 2025 09:18:13 +0200 Subject: [PATCH] support/testing: TestClangCompilerRT: Add a kernel fragment for 48 bits virtual adress Add a kernel fragment to enable CONFIG_ARM64_VA_BITS_48 for the AARCH64 QEMU platform in the clang compiler -rt runtime test. Without this setting, this sanitize-based test fails with clang-20 due to insufficient virtual adress space. "This might potentially affect ARM platforms with 39-bit address space." from [1] [1] https://github.com/llvm/llvm-project/commit/a588cfe37ea36ec4fae35a233a13d3557fba86e9 Signed-off-by: El Mehdi YOUNES Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- support/testing/tests/package/test_clang.py | 5 ++++- .../tests/package/test_clang/linux-arm64-va48.fragment | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 support/testing/tests/package/test_clang/linux-arm64-va48.fragment diff --git a/support/testing/tests/package/test_clang.py b/support/testing/tests/package/test_clang.py index f36faa059a..a9794a49fa 100644 --- a/support/testing/tests/package/test_clang.py +++ b/support/testing/tests/package/test_clang.py @@ -7,8 +7,10 @@ FUZZ_TIMEOUT = 120 class TestClangCompilerRT(infra.basetest.BRTest): br2_external = [infra.filepath("tests/package/br2-external/clang-compiler-rt")] + # Without this option the test fails due to insufficient address space for 64-bit allocator + va48_fragment = infra.filepath("tests/package/test_clang/linux-arm64-va48.fragment") config = \ - """ + f""" BR2_aarch64=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" @@ -17,6 +19,7 @@ class TestClangCompilerRT(infra.basetest.BRTest): BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.283" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{va48_fragment}" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_COMPILER_RT=y BR2_PACKAGE_LLVM=y diff --git a/support/testing/tests/package/test_clang/linux-arm64-va48.fragment b/support/testing/tests/package/test_clang/linux-arm64-va48.fragment new file mode 100644 index 0000000000..1bafe6e581 --- /dev/null +++ b/support/testing/tests/package/test_clang/linux-arm64-va48.fragment @@ -0,0 +1 @@ +CONFIG_ARM64_VA_BITS_48=y