On 10/12/2024 21.43, Alex Bennée wrote:
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
This boot an OP-TEE environment, and launch a nested guest VM inside it
using the Realms feature. We do it for virt and sbsa-ref platforms.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
-----
v2:
- move test to its own file
- add sbsa test
- check output of `cca-workload-attestation report`
v3:
- build and run test with cca-v4 images
- factorize nested guest test between both tests
- remove accel tcg option as it is the default when running tests
Note: It's a long test and there is a work in progress to understand why
debug build is so slow (x12 vs optimized).
v4:
- use pauth-impdef=on to speed up build time execution (x2.5 faster)
- increase timeout value
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20241203213629.2482806-1-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/functional/meson.build | 4 +
tests/functional/test_aarch64_rme_sbsaref.py | 70 +++++++++++++
tests/functional/test_aarch64_rme_virt.py | 100 +++++++++++++++++++
3 files changed, 174 insertions(+)
create mode 100755 tests/functional/test_aarch64_rme_sbsaref.py
create mode 100755 tests/functional/test_aarch64_rme_virt.py
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index 0a76bd9954..4e207c53d5 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -13,6 +13,8 @@ endif
test_timeouts = {
'aarch64_aspeed' : 600,
'aarch64_raspi4' : 480,
+ 'aarch64_rme_virt' : 1200,
+ 'aarch64_rme_sbsaref' : 1200,
I was a little bit worried when I saw the big timeout values here, but
that's only for debug builds, right? I gave it a try in a standard build,
the tests both finished within 5 minutes, so the standard runtime still
seems to be ok.
Tested-by: Thomas Huth <thuth@redhat.com>
> + # This tests the FEAT_RME cpu implementation, by booting a VM
supporting it,
> + # and launching a nested VM using it.
> + def test_aarch64_rme_sbsaref(self):
> + stack_path_tar_gz = self.ASSET_RME_STACK_SBSA.fetch()
> + archive_extract(stack_path_tar_gz, self.workdir)
> +
> + self.set_machine('sbsa-ref')
> + self.vm.set_console()
> + self.require_accelerator('tcg')
Please move the set_machine and require_accelerator to the beginning of the
function since they can skip the test in case the prerequisite is not
available. Otherwise you've extracted the asset in vain.