From f2218e7b6a4f8c2c3d6db00703caad95f5e5b157 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Tue, 19 Mar 2019 10:59:11 +0000 Subject: Reintroduce Cactus-MM and SPM-MM tests The code has been taken from commit 99f4fd283b6f ("cactus: Use UART2 instead of UART0") and modified slightly to be integrated in the current master. There are three tests that are failing in the CI. They have been disabled for the time being: - mem_attr_changes_tests() in cactus_main() in the file spm/cactus_mm/cactus_mm_main.c. - Two tests in the file tftf/tests/tests-spm-mm.xml. Change-Id: I6332cbff1cefeb82b9447fae1b613879e65186a1 Signed-off-by: Antonio Nino Diaz --- spm/cactus_mm/cactus_mm_tests_misc.c | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 spm/cactus_mm/cactus_mm_tests_misc.c (limited to 'spm/cactus_mm/cactus_mm_tests_misc.c') diff --git a/spm/cactus_mm/cactus_mm_tests_misc.c b/spm/cactus_mm/cactus_mm_tests_misc.c new file mode 100644 index 0000000..1d4d18a --- /dev/null +++ b/spm/cactus_mm/cactus_mm_tests_misc.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2018-2019, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include +#include + +#include "cactus_mm.h" +#include "cactus_mm_tests.h" + +/* + * Miscellaneous SPM tests. + */ +void misc_tests(void) +{ + int32_t ret; + + const char *test_sect_desc = "miscellaneous"; + + announce_test_section_start(test_sect_desc); + + const char *test_version = "SPM version check"; + + announce_test_start(test_version); + svc_args svc_values = { SPM_VERSION_AARCH32 }; + ret = sp_svc(&svc_values); + INFO("Version = 0x%x (%u.%u)\n", ret, + (ret >> 16) & 0x7FFF, ret & 0xFFFF); + expect(ret, SPM_VERSION_COMPILED); + announce_test_end(test_version); + + announce_test_section_end(test_sect_desc); +} -- cgit v1.2.3