I am Working on Optee in imx8mm device and xtests and other applications were working fine. However, then I enabled the following flags in Optee-os
```
EXTRA_OEMAKE:append = " \
CFG_RPMB_FS=y \
CFG_RPMB_WRITE_KEY=y \
CFG_RPMB_FS_DEV_ID=0 \
CFG_RPMB_TESTKEY=y \
CFG_REE_FS=y \
"
```
and added the` RPMB_EMU=0` in tee-supplicant/Makefile in optee-client but after doing these changes, all my tests are failing
```
* regression_1004 Test User Crypt TA
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:459: xtest_teec_open_session( &session, &crypt_user_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1004 FAILED
* regression_1005 Many sessions
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:551: xtest_teec_open_session(&sessions[i], &concurrent_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1005 FAILED
* regression_1006 Test Basic OS features
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:570: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1006 FAILED
* regression_1007 Test Panic
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:594: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1007 FAILED
* regression_1008 TEE internal client API
o regression_1008.1 Invoke command
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:738: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1008.1 FAILED
o regression_1008.2 Invoke command with timeout
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:759: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1008.2 FAILED
o regression_1008.3 Create session fail
n = 0
```
Note:
I am using optee_os_3.19 version right now. I have not touched the emmc rpmb before. I even removed the `CFG_REE_FS=y` flag but it still gave the same results
Solved! Go to Solution.
Hi! I am already running as sudo user. Here I have gone to more details and found some reason for error.
Hello,
Please make sure to run tee-supplicant with sudo before running the test.
https://github.com/OP-TEE/optee_os/issues/865#issuecomment-228551328
Best regards/Saludos,
Aldo.
Hi! I am already running as sudo user. Here I have gone to more details and found some reason for error.
Sorry this function is called for IMX I guess, the other one is called for plat-zynqmp