Skip to content
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

HiKey: xtest 7671 fails (1.0.0-rc2) #494

Closed
jforissier opened this issue Oct 9, 2015 · 2 comments
Closed

HiKey: xtest 7671 fails (1.0.0-rc2) #494

jforissier opened this issue Oct 9, 2015 · 2 comments

Comments

@jforissier
Copy link
Contributor

Using https://github.com/OP-TEE/manifest (tag: 1.0.0-rc2) to run the full xtest on HiKey. All tests pass except 7671. And running xtest 7671 again always fails at this point.

root@HiKey:/ xtest 7671
Test ID: 7671
Run test suite with level=0

TEE test application started with device [opteearmtz00]
######################################################
#
# XTEST_TEE_TEST
#
######################################################

* XTEST_TEE_7671 9d-69-f3
DBG TEE-CORE:tee_ta_init_static_ta_session:1137:    Lookup for Static TA 534d4152-5443-534c
DBG TEE-CORE:tee_ta_init_session_with_signed_ta:1180:    Load dynamic TA
DBG TEE-CORE:tee_ta_load:619: Loaded TA at 0x3f200000
DBG TEE-CORE:tee_ta_load:620: ELF load address 0x40200000
DBG TEE-CORE:tee_ta_init_session_with_signed_ta:1188:       dyn TA : 534d4152-5443-534c
ERR TEE-CORE:tee_fs_common_open:1221: tee file not exists
ERR TEE-CORE:tee_fs_common_open:1221: tee file not exists
ERR TEE-CORE:tee_fs_common_open:1221: tee file not exists
ERR TEE-CORE:tee_fs_common_open:1221: tee file not exists
ERR TEE-CORE:tee_fs_common_open:1221: tee file not exists
ERR TEE-CORE:tee_fs_common_open:1221: tee file not exists
ERR TEE-CORE:tee_fs_common_open:1221: tee file not exists
DBG TEE-CORE:open_tee_file:1162: Opening TEE file=52414D5343544C535444415441535431/.6F626A65637450657273697374656E7431
DBG TEE-CORE:tee_fs_common_ftruncate:1389: Ignore due to file length does not changed
DBG TEE-CORE:tee_fs_common_write:1593: data len=16
DBG TEE-CORE:tee_fs_do_multi_blocks_transfer:1028: start_block:0, end_block:0, len:16
DBG TEE-CORE:write_one_block:806: offset=0, length=16
ERR TEE-CORE:write_one_block:818: Failed to allocate plaintext buffer, size=4096
DBG TEE-CORE:tee_ta_invoke_command:1408:   => Error: f00d of 4
ERR [968] TEEC:TEEC_InvokeCommand:396: Function returns with [61453]
./xml/include/xml_datastorage_api.h:1321: Expression "res == expectedReturn" (61453 == 0) is false
DBG TEE-CORE:tee_ta_close_session:998: tee_ta_close_session(0x3f053690)
DBG TEE-CORE:tee_ta_close_session:1017:    ... Destroy session
DBG TEE-CORE:tee_ta_destroy_context:933:    ... Destroy TA ctx
  XTEST_TEE_7671 FAILED
+-----------------------------------------------------
Result of testsuite XTEST_TEE_TEST filtered by "7671":
XTEST_TEE_7671 FAILED first error at ./xml/include/xml_datastorage_api.h:1321
+-----------------------------------------------------
13 subtests of which 1 failed
1 test case of which 1 failed
700 test cases was skipped
TEE test application done!

Sometimes, the first invocation of xtest is successfull (all tests pass) and you have to run xtest again to get multiple failures. AFAICT all failed tests report some memory allocation error similar to the above trace.

Running xtest 7671 on a freshly booted board shows no error.

@jforissier
Copy link
Contributor Author

To reproduce the issue faster:

root@HiKey:/ xtest _76 ; xtest _76

@jforissier
Copy link
Contributor Author

Looks like a regression introduced by a2e9a83

  • Test case: while [ $? -eq 0 ]; do xtest _76 ; done
  • Commit 8a7ee79 (1.0.0-rc2) fails this test
  • Same commit with a2e9a83 reverted passes the test

cedric-chaumont-st-dev pushed a commit to cedric-chaumont-st-dev/optee_os that referenced this issue Oct 13, 2015
Enumeration loop added for object corruption.
Add missing free because of tee_svc_storage_set_enum
obj_id memory allocation (malloc) during enumeration loop.
Force obj_id to NULL in the enumation loop to skip freeing
at 'exit' label statement.
closes OP-TEE#494

Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com>
Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards)
Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
cedric-chaumont-st-dev pushed a commit to cedric-chaumont-st-dev/optee_os that referenced this issue Oct 13, 2015
Enumeration loop added for object corruption.
Add missing free because of tee_svc_storage_set_enum
obj_id memory allocation (malloc) during enumeration loop.
Force obj_id to NULL in the enumation loop to skip freeing
at 'exit' label statement.
closes OP-TEE#494

Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant