Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Runner/config/pkg_command_map.conf
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,24 @@ opkg:Sensors:sns_test=qcom-sensors-api qcom-sensors-core qcom-sensors-registry q
debian:package-set:fastrpc=fastrpc-support fastrpc-tests
ubuntu:package-set:fastrpc=fastrpc-support fastrpc-tests

# ---------------------------------------------------------------------------
# Qualcomm QTEE PKCS#11 validation packages.
#
# xtest-qtee depends on libckqteec0 and the MinkIPC client libraries. The
# qteesupplicant package is listed explicitly because the PKCS#11 Trusted
# Application needs the running QTEE listener services during validation.
#
# These packages are currently recovered from qli-staging by the PKCS#11
# runner on Debian and Ubuntu. Yocto, CentOS, and other distributions continue
# to use image-provided components until confirmed package mappings exist.
# ---------------------------------------------------------------------------

debian:package-set:minkipc-pkcs11=minkipc-qteesupplicant xtest-qtee
ubuntu:package-set:minkipc-pkcs11=minkipc-qteesupplicant xtest-qtee

debian:xtest_qtee=xtest-qtee
ubuntu:xtest_qtee=xtest-qtee

# ---------------------------------------------------------------------------
# Qualcomm userspace-resource-manager package set.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
metadata:
name: MinkIPC_PKCS11_Multi_Client_Validation
format: "Lava-Test Test Definition 1.0"
description: "Validate concurrent MinkIPC QTEE PKCS#11 clients and bounded recovery from serialized TA open contention"
maintainer:
- "Qualcomm Linux Testkit"
os:
- linux
scope:
- functional

params:
CLIENT: ""
TEE_ID: ""
CLIENTS: "2"
TIMEOUT: "300"
BUSY_RETRIES: "5"

run:
steps:
- REPO_PATH=$PWD
- cd Runner/suites/Kernel/Baseport/MinkIPC_PKCS11_Multi_Client_Validation
- XTEST_QTEE="${CLIENT}" XTEST_TEE_ID="${TEE_ID}" XTEST_CLIENT_COUNT="${CLIENTS}" XTEST_TIMEOUT="${TIMEOUT}" XTEST_BUSY_RETRIES="${BUSY_RETRIES}" ./run.sh || true
- $REPO_PATH/Runner/utils/send-to-lava.sh MinkIPC_PKCS11_Multi_Client_Validation.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# MinkIPC QTEE PKCS#11 Multi-Client Validation

This suite starts multiple `xtest_qtee` processes concurrently to validate
MinkIPC and QTEE PKCS#11 multi-client handling. Each process runs only the
non-mutating cases:

- 1000: initialize and close the Cryptoki library.
- 1001: enumerate slots, token information, and mechanisms.
- 1002: open, inspect, and close sessions.

Token initialization and object-mutating cases are intentionally excluded so
the concurrent clients do not race while changing shared persistent state.

QTEE serializes part of the TA session-open path. When simultaneous processes
race that path, one process may receive `TEEC_ERROR_BUSY` (`0xffff000d`). The
runner treats only that exact open-session response as transient and retries
the affected client with a short bounded backoff. Any other command or result
failure is reported immediately. Every client must eventually pass all three
cases and leave no relevant QCOMTEE or RPMB kernel errors.

Run two clients with defaults:

```sh
./run.sh
```

Run four clients against a selected TEE:

```sh
./run.sh --clients 4 --tee 1
```

Change the number of retries allowed after a QTEE busy response:

```sh
./run.sh --busy-retries 3
```

The default is five retries after the initial attempt. Set
`--busy-retries 0` to require every concurrent client to pass on its first
attempt.
Loading
Loading