Page MenuHomePhabricator

Interactive tests fail to return to main thread after test has ran and sit in osRtxIdleThread() function
Open, NormalPublic


It seems that the interactive tests will only run the first test, when it exits the test thread, the control should be handed back to the execute_ns_interactive_tests() function in core_ns_interactive_testsuite.c as it uses osThreadJoin() which, according to should return once the thread has terminated, but instead when the thread calls osThreadExit() the code goes to RTX's osRtxIdleThread() function where it sits in an endless loop doing nothing and so the test never progresses past the first test.

Event Timeline

lairdjm triaged this task as Normal priority.Mon, Mar 29, 8:32 AM
lairdjm created this task.
davidwang assigned this task to karl-zh.Tue, Apr 6, 3:06 AM
Karl claimed this task.Wed, Apr 7, 6:41 AM
Karl added a subscriber: karl-zh.

I took a look at this test case, the interactive test suit is disabled by default. Could you append some logs or command on your platform of TFM_CORE_TEST_2001
The test from my side on AN521 will stop after scenario 1:

Executing 'TFM_CORE_TEST_2001'

Description: 'Interactive tests'

Scenario 1 - SequentialTrying to acquire the TFM core from NS [seq_task]NS Lock: acquired [seq_task]Secure call to tfm_spm_core_test_sfn_veneer(&in_vec, 1, NULL, 0) failed, generic!NS Lock: releasing... [seq_task]Scenario 1 - test finished

The build command from my test:
#cmake --build cmake_build -- install -j 8

You will need to apply this patch in order for the interactive tests to function as without it the secure part will never build with that part enabled
After applying that and building using:


And running it, the first test passes but the freezes at the same point as yours does, it does not continue with the next task

Karl added a comment.Wed, Apr 7, 7:02 AM

Okay, I run into a fault when apply this patch on AN521, may need some investigations :
Running Test Suite Core non-secure interactive tests (TFM_CORE_TEST_2XXX)...

Executing 'TFM_CORE_TEST_2001'

Description: 'Interactive tests'

Segmentation fault