On Tue, Sep 16, 2025 at 09:14:19AM -0700, Raymond Mao wrote: > Add test cases to validate FDT and TPM eventlog handoff from TF-A > and OP-TEE via bloblist. > > For FDT, the nodes 'reserved-memory' and 'firmware' appended by > OP-TEE indicates a successful handoff. > > For TPM eventlog, the events 'SECURE_RT_EL3', 'SECURE_RT_EL1_OPTEE' > and 'SECURE_RT_EL1_OPTEE_EXTRA1' created by TF-A indicates a > successful handoff. > > Signed-off-by: Raymond Mao <raymond....@linaro.org> > --- > test/py/tests/test_fw_handoff.py | 94 ++++++++++++++++++++++++++++++++ > 1 file changed, 94 insertions(+) > create mode 100644 test/py/tests/test_fw_handoff.py > > diff --git a/test/py/tests/test_fw_handoff.py > b/test/py/tests/test_fw_handoff.py > new file mode 100644 > index 00000000000..4cdf51a4375 > --- /dev/null > +++ b/test/py/tests/test_fw_handoff.py > @@ -0,0 +1,94 @@ > +# SPDX-License-Identifier: GPL-2.0+ > +# > +# Copyright (c) 2025 Linaro Limited > +# Author: Raymond Mao <raymond....@linaro.org> > +# > +# Validate Firmware Handoff from TF-A and OP-TEE > + > +import pytest > +import re > + > +def _norm_ws(s: str) -> str: > + """Normalize whitespace for robust comparisons.""" > + return re.sub(r"\s+", " ", s).strip() > + > +@pytest.mark.buildconfigspec("bloblist") > +@pytest.mark.buildconfigspec("cmd_bloblist") > +@pytest.mark.buildconfigspec("of_control") > +@pytest.mark.buildconfigspec("cmd_fdt") > +def test_fw_handoff_dt(ubman): > + """Validate FDT handoff via bloblist.""" > + > + if (ubman.config.board_type != 'qemu_arm64' or > + ubman.config.board_identity != 'fw_handoff_tfa_optee'): > + pytest.skip("Test only for qemu_arm64 with ID fw_handoff_tfa_optee")
This (and the other tests) should be more pytest.mark.buildconfigspec but for TARGET_QEMU_ARM_64BIT and then relevant TF-A/OP-TEE options. And even then, possibly just the relevant TF-A/OP-TEE options as it should work on other platforms too, yes? Thanks. -- Tom
signature.asc
Description: PGP signature