Skip to content

Commit c093978

Browse files
authored
Merge pull request #10067 from ARMmbed/release-candidate
Release candidate for mbed-os-5.12.0-rc2
2 parents 7dd791e + 1668a9d commit c093978

File tree

656 files changed

+252519
-94830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

656 files changed

+252519
-94830
lines changed

.astyleignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ components/802.15.4_RF
2424
components/wifi
2525
components/TARGET_PSA/TARGET_TFM
2626
tools
27+
components/TARGET_PSA/TESTS
2728
components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl
2829
components/TARGET_PSA/services/attestation/qcbor
29-
components/TARGET_PSA/services/attestation/attestation.h
30+
components/TARGET_PSA/services/attestation/attestation.h

TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void test_isr_stack_in_range(void)
204204
{
205205
// MSP stack should be very near end (test using within 128 bytes)
206206
uint32_t msp = __get_MSP();
207-
bool result = inrange(msp, mbed_stack_isr_start + mbed_stack_isr_size - 128, 128);
207+
bool result = inrange(msp, mbed_stack_isr_start + mbed_stack_isr_size - 0x400, 0x400);
208208

209209
TEST_ASSERT_TRUE_MESSAGE(result, "Interrupt stack in wrong location");
210210
}

TESTS/mbedmicro-rtos-mbed/mail/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using namespace utest::v1;
3333
#define THREAD_STACK_SIZE 512
3434
#elif defined(__ARM_FM)
3535
#define THREAD_STACK_SIZE 512
36-
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
36+
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
3737
#define THREAD_STACK_SIZE 512
3838
#else
3939
#define THREAD_STACK_SIZE 320 /* larger stack cause out of heap memory on some 16kB RAM boards in multi thread test*/

TESTS/mbedmicro-rtos-mbed/malloc/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ volatile bool thread_should_continue = true;
4141
#define THREAD_STACK_SIZE 512
4242
#elif defined(__ARM_FM)
4343
#define THREAD_STACK_SIZE 512
44-
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
44+
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
4545
#define THREAD_STACK_SIZE 512
4646
#else
4747
#define THREAD_STACK_SIZE 256

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define PARALLEL_THREAD_STACK_SIZE 512
3737
#elif defined(__ARM_FM)
3838
#define PARALLEL_THREAD_STACK_SIZE 512
39-
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
39+
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
4040
#define PARALLEL_THREAD_STACK_SIZE 512
4141
#else
4242
#define PARALLEL_THREAD_STACK_SIZE 384

TESTS/psa/attestation/main.cpp

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "greentea-client/test_env.h"
2424
#include "unity/unity.h"
2525
#include "utest/utest.h"
26+
#include "psa/lifecycle.h"
2627
#include "psa_initial_attestation_api.h"
2728
#include "psa_attest_inject_key.h"
2829
#include <string.h>
@@ -128,17 +129,9 @@ utest::v1::status_t case_teardown_handler(const Case *const source, const size_t
128129

129130
utest::v1::status_t case_setup_handler(const Case *const source, const size_t index_of_case)
130131
{
131-
return greentea_case_setup_handler(source, index_of_case);
132-
}
133-
134-
Case cases[] = {
135-
Case("PSA attestation get token", check_initial_attestation_get_token, case_teardown_handler),
136-
};
137-
138-
Specification specification(greentea_test_setup, cases);
139-
140-
int main()
141-
{
132+
psa_status_t status;
133+
status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST);
134+
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
142135
#if (defined(COMPONENT_PSA_SRV_IPC) || defined(MBEDTLS_ENTROPY_NV_SEED))
143136
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
144137
/* inject some seed for test*/
@@ -149,5 +142,17 @@ int main()
149142
/* don't really care if this succeeds this is just to make crypto init pass*/
150143
mbedtls_psa_inject_entropy(seed, MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE);
151144
#endif
145+
return greentea_case_setup_handler(source, index_of_case);
146+
}
147+
148+
149+
Case cases[] = {
150+
Case("PSA attestation get token", case_setup_handler, check_initial_attestation_get_token, case_teardown_handler),
151+
};
152+
153+
Specification specification(greentea_test_setup, cases);
154+
155+
int main()
156+
{
152157
return !Harness::run(specification);
153158
}

TESTS/psa/its_ps/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ utest::v1::status_t case_its_teardown_handler(const Case *const source, const si
157157
{
158158
psa_status_t status;
159159
status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST);
160-
TEST_ASSERT_EQUAL(PSA_LIFECYCLE_SUCCESS, status);
160+
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
161161
return greentea_case_teardown_handler(source, passed, failed, reason);
162162
}
163163

@@ -167,7 +167,7 @@ utest::v1::status_t case_its_setup_handler(const Case *const source, const size_
167167
psa_status_t status;
168168
if (stype == its) {
169169
status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST);
170-
TEST_ASSERT_EQUAL(PSA_LIFECYCLE_SUCCESS, status);
170+
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
171171
} else {
172172
status = psa_ps_reset();
173173
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);

TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,16 @@ Case cases[] = {
460460
Case("Testing client tx_buff_null", tx_buff_null),
461461
Case("Testing client rx_tx_null", rx_tx_null),
462462
Case("Testing client multiple_call from a single thread", multiple_call),
463-
Case("Testing client exceed num of max channels allowed", exceed_num_of_max_channels),
464463
Case("Testing client close on NULL handle", client_close_null_handle),
465464
Case("Testing DROP_CONNECTION State", drop_connection),
466465
Case("Testing client psa_framework_version() API", verify_psa_framework_version),
467466
Case("Testing client psa_version() API on existing SID", psa_version_existing),
468467
Case("Testing client psa_version() API on non-existing SID", psa_version_non_existing),
469468
Case("Testing client psa_version() API to a service that is not NSPE callable", psa_version_secure_access_only),
470469
Case("Testing client multiple calls on different channels to the same SID", multi_thread_diff_handles),
470+
#if defined TARGET_MBED_SPM // TF-M issue: https://developer.trustedfirmware.org/T244
471+
Case("Testing client exceed num of max channels allowed", exceed_num_of_max_channels),
472+
#endif
471473
};
472474

473475
utest::v1::status_t test_setup(const size_t number_of_cases)

TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ Case cases[] = {
264264
SPM_UTEST_CASE("Try to skip more bytes than left while reading", skip_more_than_left),
265265
SPM_UTEST_CASE("Test rhandle implementation by calculating the factorial function", rhandle_factorial),
266266
SPM_UTEST_CASE("Test a call flow between 2 secure partitions", cross_partition_call),
267+
#if defined TARGET_MBED_SPM // TF-M issue: https://developer.trustedfirmware.org/T273
267268
SPM_UTEST_CASE("Test a common DOORBELL scenario", doorbell_test),
269+
#endif
268270
};
269271

270272
//Declare your test specification with a custom setup handler

TESTS/psa/spm_server/COMPONENT_SPE/tests.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,8 @@ psa_test_server_side_func test_list[] = {
698698
PSA_TEST_SERVER_NAME(skip_more_than_left),
699699
PSA_TEST_SERVER_NAME(rhandle_factorial),
700700
PSA_TEST_SERVER_NAME(cross_partition_call),
701+
#if defined TARGET_MBED_SPM // TF-M issue: https://developer.trustedfirmware.org/T273
701702
PSA_TEST_SERVER_NAME(doorbell_test),
703+
#endif
702704
NULL
703705
};

0 commit comments

Comments
 (0)