-
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
Skip Bare Metal green tea test for PSA component #11821
Conversation
-PSA test framework uses the RTOS threads to run test cases so added MBED_CONF_RTOS_PRESENT to all the test cases.
@rajkan01, thank you for your changes. |
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 comment
The 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 main_wrapper()
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Why is pal_mbed_os_intf.cpp
included in the build at all? Is it needed for anything in baremetal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with this approach (no-op in test_start()
) so long as greentea sees the PSA tests are skipped, not that they passed (because pass is meaningless if the tests did nothing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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...
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 comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with this approach (no-op in test_start()
) so long as greentea sees the PSA tests are skipped, not that they passed (because pass is meaningless if the tests did nothing).
Please make sure this doesn't break testing on NXP LPC55S69 or Cypress PSoC 6 target. Thanks. |
TESTS/psa/its_ps/main.cpp
Outdated
#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 comment
The 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 comment
The 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
TESTS/psa/its_ps/main.cpp
Outdated
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
!defined (TARGET_PSA)
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Comment update, please. - // !defined(MBED_CONF_RTOS_PRESENT)
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Comment update please to all files - // !defined(MBED_CONF_RTOS_PRESENT)
Hi @rajkan01, Please, could you share the |
The expected behaviour is that the tests should be skipped. @rajkan01 please look into it |
@jainvikas8 This PR disables bare metal tests for PSA component but bare metal support in greentea is added in #11721. So if you want to run bare metal tests on LPC55S69 you need both PRs. |
@evedon @rajkan01 If the above steps are correct:
|
you need to remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look good
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Might be internet internal issue, restarted tests |
Description (required)
PSA test framework requires RTOS to run so added MBED_CONF_RTOS_PRESENT to all the test cases.
Summary of change (What the change is for and why)
IOTCORE-1397[https://jira.arm.com/browse/IOTCORE-1397] Jira ticket
Documentation (Details of any document updates required)
Pull request type (required)
Test results (required)
Reviewers (optional)
@Patater @jamesbeyond @evedon @hugueskamba
Release Notes (required for feature/major PRs)
Summary of changes
Impact of changes
Migration actions required