Skip to content

xtest: use compile-time checks for CFG_SECSTOR_TA_MGMT_PTA and CFG_GP_SOCKETS - #1

Draft
andrew2311 wants to merge 2 commits into
xen-troops:4.4.0-android-xtfrom
andrew2311:4.4.0-android-xt-fix
Draft

xtest: use compile-time checks for CFG_SECSTOR_TA_MGMT_PTA and CFG_GP_SOCKETS#1
andrew2311 wants to merge 2 commits into
xen-troops:4.4.0-android-xtfrom
andrew2311:4.4.0-android-xt-fix

Conversation

@andrew2311

@andrew2311 andrew2311 commented Jul 27, 2026

Copy link
Copy Markdown

Properly fix xtest 4.4.0 link error in android 17

1st commit (backport) fixes the xtest link error on a from scratch Android
build.
2nd commit properly fixes the 4 GP sockets tests that were silently missed
(the xtest build system depends on variables from conf.mk, which is produced
by the optee_os build; but on Android, kati parses the Android.mk files when
this file isn't ready yet (before any build), and creates a wrong xtest build
configuration for ninja) - so the GP sockets option check should be done only
at compile time. Then, if optee_os is set as a dependency of optee_test,
optee_test has the CFG_* variables properly set.

Draft because waiting for feedback about OP-TEE#825

Makes xtest tool more flexible regarding OP-TEE configuration
of CFG_SECSTOR_TA_MGMT_PTA.

Embed TA install interface in xtest even if devkit configuration
says the secure storage TA management PTA service is not available.
If the service is not found (secstor TA management PTA) print an
explicit error message instead.

This change does not change xtest regression suite behavior and will
still fails if one uses --install-ta option when the effective embedded
TEE does not provide this service. This change adds an explicit error
message when so.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 44ec72b)
@andrew2311
andrew2311 marked this pull request as draft July 27, 2026 11:16
Always compile regression_2000.c, sock_server.c and rand_stream.c and
guard their contents with CFG_GP_SOCKETS taken from conf.h, instead of
selecting them into the source list with CFG_GP_SOCKETS taken from the
TA dev kit conf.mk.

During the Android build, conf.mk is read by kati to generate a build
description for ninja before any actual build happens (including optee_os
and ta dev kit), so this results in a missing conf.mk file and a wrong
ninja build configuration. These three files were therefore dropped without
any diagnostics on a clean build, and xtest ended up without the GP socket
tests even though the TEE is built with support for them. Adding an
optee_os/dev kit build dependency for optee_test can't help, because kati
generates the very ninja graph that would build conf.mk. conf.h, on the
other hand, is force-included by all three build systems and is guaranteed
to be there by the time the compiler runs.

This is what commit 44ec72b ("xtest: remove CFG_SECSTOR_TA_MGMT_PTA
dependency") already did for install_ta.c. No functional change for
either setting of CFG_GP_SOCKETS.

Link: OP-TEE#275 [1]
Signed-off-by: Andrii Shtompel <andrii_shtompel@epam.com>
(cherry picked from commit d72b29c)
@andrew2311
andrew2311 force-pushed the 4.4.0-android-xt-fix branch from 28d4571 to 7d06161 Compare July 28, 2026 11:23
@andrew2311 andrew2311 changed the title xtest: remove CFG_SECSTOR_TA_MGMT_PTA dependency xtest: use compile-time checks for CFG_SECSTOR_TA_MGMT_PTA and CFG_GP_SOCKETS Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants