mbox series

[v2,0/2] Fix Rust self-test failures on PowerPC

Message ID 20251103082911.1792759-1-peter.tatrai.ext@siemens.com
Headers show
Series Fix Rust self-test failures on PowerPC | expand

Message

P. Tatrai Nov. 3, 2025, 8:29 a.m. UTC
From: Peter Tatrai <peter.tatrai.ext@siemens.com>

This patch series fixes oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust
failures on the PowerPC (qemuppc) target.

The root cause is that the Rust self-test executes 'python3 src/bootstrap/bootstrap.py
test' in an environment where recipe level RUSTFLAGS are not propagated.
The test binaries use LLVM's compression functionality and require explicit
linker flags for zlib and zstd libraries.

The fix is specific to the rust selftest and involves:

1. Passing -lz and -lzstd linker arguments via RUSTFLAGS when running the
   bootstrap test suite (this happens in the test harness command, not at
   the recipe level)

2. Adding libzstd runtime package to the QEMU test image (zlib is already
   present by default in core-image-minimal)

This approach is more targeted than modifying the recipe or wrapper mechanism,
as it only affects the selftest execution environment.

Changes from v1:
- Replaced recipe-level changes (WRAPPER_TARGET_EXTRALD and wrapper fixes)
  with selftest-specific fix
- Focused on the actual execution context where RUSTFLAGS are needed (selftest
  harness command that runs bootstrap test)

Peter Tatrai (2):
  oeqa/selftest/rust: pass zlib/zstd link args to test build
  oeqa/selftest/rust: add libzstd to test image runtime packages

 meta/lib/oeqa/selftest/cases/rust.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)