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

xtest: pkcs11: fix false positive error report on CKR_HOST_MEMORY #711

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

etienne-lms
Copy link
Contributor

Fix false positive error case in test 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: 2d6dc93 ("xtest: pkcs11: add symmetric cipher tests")

Copy link
Contributor

@jbech-linaro jbech-linaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Joakim Bech <[email protected]>

@etienne-lms
Copy link
Contributor Author

review tag applied

@jenswi-linaro
Copy link
Contributor

Reviewed-by: Jens Wiklander <[email protected]>

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: 2d6dc93 ("xtest: pkcs11: add symmetric cipher tests")
Reviewed-by: Joakim Bech <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
@jforissier jforissier merged commit cc7db8c into OP-TEE:master Nov 22, 2023
2 checks passed
@etienne-lms etienne-lms deleted the pkcs11-fix branch November 23, 2023 05:22
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

Successfully merging this pull request may close these issues.

4 participants