xtest: pkcs11: fix false positive error report on CKR_HOST_MEMORY

Fix false positive error cases in tests pkcs11_1004 and pkcs11_1007.

In the pkcs11_1004 test, the client creates as many PKCS#11 objects
as possible until the system fails on memory allocation error. In the
pkcs11_1007 test, the client prepares as many cipher sessions as
possible until the system fails on memory allocation error. Both
test implementations consider only CKR_DEVICE_MEMORY return code as
the condition for expected resource exhaustion while they should also
consider the host resource exhaustion return code CKR_HOST_MEMORY.

Fixes: 2d6dc9312935 ("xtest: pkcs11: add symmetric cipher tests")
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
1 file changed
tree: c10135c8bb61c5e81251df927595d72d3aff7d3f
  1. .github/
  2. cert/
  3. host/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE.md
  11. Makefile
  12. README.md
  13. typedefs.checkpatch
README.md

OP-TEE sanity testsuite

This git contains source code for the test suite (xtest) used to test the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.

// OP-TEE core maintainers