Skip to content

Commit c1486ea

Browse files
committed
Fix enum type to align with psa-arch-tests
This is related to #11256 When TARGET_PSA is enabled on Cortex-A boards, the SECURE is redeclared. So to minimize the impact we can redeclare this in val.h which is used only by Mbed. And `security_t` itself is used in mbed-os\components\TARGET_PSA\TESTS, but the SECURE string is not used. Renamed to `caller_security_t` which aligns with https://github.com/ARM-software/psa-arch-tests
1 parent 31114ba commit c1486ea

File tree

24 files changed

+33
-33
lines changed

24 files changed

+33
-33
lines changed

components/TARGET_PSA/TESTS/compliance_attestation/test_a001/test_a001.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ client_test_t test_a001_attestation_list[] = {
2929

3030
static int g_test_count = 1;
3131

32-
int32_t psa_initial_attestation_get_token_test(security_t caller)
32+
int32_t psa_initial_attestation_get_token_test(caller_security_t caller)
3333
{
3434
int num_checks = sizeof(check1)/sizeof(check1[0]);
3535
uint32_t i, status, token_size;
@@ -75,7 +75,7 @@ int32_t psa_initial_attestation_get_token_test(security_t caller)
7575
return VAL_STATUS_SUCCESS;
7676
}
7777

78-
int32_t psa_initial_attestation_get_token_size_test(security_t caller)
78+
int32_t psa_initial_attestation_get_token_size_test(caller_security_t caller)
7979
{
8080
int num_checks = sizeof(check2)/sizeof(check2[0]);
8181
uint32_t i, status, token_size;

components/TARGET_PSA/TESTS/compliance_attestation/test_a001/test_a001.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ extern val_api_t *val;
2828
extern psa_api_t *psa;
2929
extern client_test_t test_a001_attestation_list[];
3030

31-
int32_t psa_initial_attestation_get_token_test(security_t caller);
32-
int32_t psa_initial_attestation_get_token_size_test(security_t caller);
31+
int32_t psa_initial_attestation_get_token_test(caller_security_t caller);
32+
int32_t psa_initial_attestation_get_token_size_test(caller_security_t caller);
3333
#endif /* _TEST_A001_CLIENT_TESTS_H_ */

components/TARGET_PSA/TESTS/compliance_its/test_s001/test_s001.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int32_t sst_remove_stray_uid(psa_sst_uid_t p_uid)
141141
return VAL_STATUS_SUCCESS;
142142
}
143143

144-
int32_t psa_sst_uid_not_found(security_t caller)
144+
int32_t psa_sst_uid_not_found(caller_security_t caller)
145145
{
146146
int32_t test_status;
147147
psa_sst_uid_t uid = UID_BASE_VALUE + 6;

components/TARGET_PSA/TESTS/compliance_its/test_s001/test_s001.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ extern val_api_t *val;
3131
extern psa_api_t *psa;
3232
extern client_test_t test_s001_sst_list[];
3333

34-
int32_t psa_sst_uid_not_found(security_t caller);
34+
int32_t psa_sst_uid_not_found(caller_security_t caller);
3535
#endif /* _TEST_S001_CLIENT_TESTS_H_ */

components/TARGET_PSA/TESTS/compliance_its/test_s002/test_s002.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ client_test_t test_s002_sst_list[] = {
3535
NULL,
3636
};
3737

38-
int32_t psa_sst_update_write_once_flag_after_create(security_t caller)
38+
int32_t psa_sst_update_write_once_flag_after_create(caller_security_t caller)
3939
{
4040
uint32_t status;
4141
psa_sst_uid_t uid = UID_WRITE_ONCE_1;
@@ -84,7 +84,7 @@ int32_t psa_sst_update_write_once_flag_after_create(security_t caller)
8484
}
8585

8686

87-
int32_t psa_sst_create_with_write_once_flag(security_t caller)
87+
int32_t psa_sst_create_with_write_once_flag(caller_security_t caller)
8888
{
8989
uint32_t status;
9090
psa_sst_uid_t uid = UID_WRITE_ONCE_2;

components/TARGET_PSA/TESTS/compliance_its/test_s002/test_s002.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ extern val_api_t *val;
3131
extern psa_api_t *psa;
3232
extern client_test_t test_s002_sst_list[];
3333

34-
int32_t psa_sst_update_write_once_flag_after_create(security_t caller);
35-
int32_t psa_sst_create_with_write_once_flag(security_t caller);
34+
int32_t psa_sst_update_write_once_flag_after_create(caller_security_t caller);
35+
int32_t psa_sst_create_with_write_once_flag(caller_security_t caller);
3636
#endif /* _TEST_S002_CLIENT_TESTS_H_ */

components/TARGET_PSA/TESTS/compliance_its/test_s003/test_s003.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static char test_desc[2][80] = {
3939
"Overload storage space\n",
4040
"Overload storage again to verify all previous UID removed\n"};
4141

42-
int32_t psa_sst_insufficient_space(security_t caller)
42+
int32_t psa_sst_insufficient_space(caller_security_t caller)
4343
{
4444
uint32_t status = PSA_SST_SUCCESS;
4545
psa_sst_uid_t uid;

components/TARGET_PSA/TESTS/compliance_its/test_s003/test_s003.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ extern val_api_t *val;
3131
extern psa_api_t *psa;
3232
extern client_test_t test_s003_sst_list[];
3333

34-
int32_t psa_sst_insufficient_space(security_t caller);
34+
int32_t psa_sst_insufficient_space(caller_security_t caller);
3535
#endif /* _TEST_S003_CLIENT_TESTS_H_ */

components/TARGET_PSA/TESTS/compliance_its/test_s004/test_s004.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static uint8_t read_buff[TEST_BUFF_SIZE] = {0};
3737
static uint8_t write_buff[TEST_BUFF_SIZE] = {0x99, 0x01, 0x30, 0x50, 0x04, 0x23, 0xF6, 0x07, 0x08, \
3838
0x0D, 0x70, 0xA1, 0xFF, 0xFF, 0x14, 0x73, 0x46, 0x97, 0xE8, 0xDD};
3939

40-
int32_t psa_sst_get_data_check(security_t caller)
40+
int32_t psa_sst_get_data_check(caller_security_t caller)
4141
{
4242
uint32_t status,j;
4343

components/TARGET_PSA/TESTS/compliance_its/test_s004/test_s004.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ extern val_api_t *val;
3131
extern psa_api_t *psa;
3232
extern client_test_t test_s004_sst_list[];
3333

34-
int32_t psa_sst_get_data_check(security_t caller);
34+
int32_t psa_sst_get_data_check(caller_security_t caller);
3535
#endif /* _TEST_S004_CLIENT_TESTS_H_ */

0 commit comments

Comments
 (0)