-
Notifications
You must be signed in to change notification settings - Fork 3k
Skip Bare Metal green tea test for PSA component #11821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,8 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
#ifndef TARGET_PSA | ||
#error [NOT_SUPPORTED] ITS/PS tests can run only on PSA-enabled targets. | ||
#if !defined(TARGET_PSA) || !defined(MBED_CONF_RTOS_PRESENT) | ||
#error [NOT_SUPPORTED] ITS/PS tests can run only on PSA-enabled targets and RTOS. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PSA-targets with RTOS present. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes PSA test cases use threads to run the test case and in bare-metal we don't have any thread support so i guarded with MBED_CONF_RTOS_PRESENT |
||
#else | ||
|
||
#include "greentea-client/test_env.h" | ||
|
@@ -238,4 +238,4 @@ int main() | |
return !Harness::run(specification); | ||
} | ||
|
||
#endif // TARGET_PSA | ||
#endif // TARGET_PSA || !defined(MBED_CONF_RTOS_PRESENT) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. !defined (TARGET_PSA) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
#include "val_interfaces.h" | ||
#include "pal_mbed_os_intf.h" | ||
|
||
#if !defined(MBED_CONF_RTOS_PRESENT) | ||
#error [NOT_SUPPORTED] PSA compliance attestation test cases requires RTOS to run. | ||
#else | ||
void test_entry_a001(val_api_t *val_api, psa_api_t *psa_api); | ||
|
||
int main(void) | ||
{ | ||
test_start(test_entry_a001, COMPLIANCE_TEST_ATTESTATION); | ||
} | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#include "val_interfaces.h" | ||
#include "pal_mbed_os_intf.h" | ||
|
||
#if !defined(MBED_CONF_RTOS_PRESENT) | ||
#error [NOT_SUPPORTED] PSA compliance its test cases requires RTOS to run | ||
#else | ||
|
||
#ifdef ITS_TEST | ||
void test_entry_s001(val_api_t *val_api, psa_api_t *psa_api); | ||
#elif PS_TEST | ||
|
@@ -15,3 +19,4 @@ int main(void) | |
test_start(test_entry_p001, COMPLIANCE_TEST_STORAGE); | ||
#endif | ||
} | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment update, please. - // !defined(MBED_CONF_RTOS_PRESENT) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#include "val_interfaces.h" | ||
#include "pal_mbed_os_intf.h" | ||
#include "lifecycle.h" | ||
#if !defined(MBED_CONF_RTOS_PRESENT) | ||
#error [NOT_SUPPORTED] PSA compliance its test cases requires RTOS to run | ||
#else | ||
|
||
#ifdef ITS_TEST | ||
void test_entry_s002(val_api_t *val_api, psa_api_t *psa_api); | ||
|
@@ -16,3 +19,4 @@ int main(void) | |
test_start(test_entry_p002, COMPLIANCE_TEST_STORAGE); | ||
#endif | ||
} | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#include "val_interfaces.h" | ||
#include "pal_mbed_os_intf.h" | ||
|
||
#if !defined(MBED_CONF_RTOS_PRESENT) | ||
#error [NOT_SUPPORTED] PSA compliance its test cases requires RTOS to run | ||
#else | ||
|
||
#ifdef ITS_TEST | ||
void test_entry_s005(val_api_t *val_api, psa_api_t *psa_api); | ||
#elif PS_TEST | ||
|
@@ -15,3 +19,4 @@ int main(void) | |
test_start(test_entry_p005, COMPLIANCE_TEST_STORAGE); | ||
#endif | ||
} | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment update please to all files - // !defined(MBED_CONF_RTOS_PRESENT) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,9 +135,11 @@ int test_start(test_entry_f test_f, compliance_test_type type) | |
{ | ||
test_g = test_f; | ||
type_g = type; | ||
#if defined(MBED_CONF_RTOS_PRESENT) | ||
MBED_ASSERT((type > COMPLIANCE_TEST_START) && (type < COMPLIANCE_TEST_END)); | ||
Thread thread(osPriorityNormal, TEST_STACK_SIZE, NULL); | ||
thread.start(main_wrapper); | ||
thread.join(); | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need these ifdefs? Will this function run when there is no RTOS? What do we want this function to do if there is no RTOS? If this function will run, and we want it to be more than a no-op, perhaps we should call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Patater When we do "mbed test -m NUCLEO_F411RE -t GCC_ARM --app-config TESTS/configs/baremetal.json" then build tools build mbed-os and green tea test with bare-metal configuration and No RTOS. pal_mbed_os_intf.cpp uses RTOS API which leads to undefined threads APIs and builds fails.so I added the ifdefs to make the build pass. This is the first level changes to make green tea test to run in bare metal once this PR gets merged then please do necessary changes on PSA to make it work for bare-metal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am happy with this approach (no-op in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could have returned a non-zero value but it is not checked anywhere... |
||
return 0; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.