ARMmbed / ARMmbed/mbed-crypto

PSA: missing test coverage for BUFFER_TOO_SMALL

Open
#200 3 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue Jira status: REOPENED mirrored type: enhancement
Dominant language
C
Stars
108
Forks
95
PR merge metrics
No merged PRs in 30d

Description

### Description

We mostly don't test what `psa_xxx` functions do if they write output to a buffer and that buffer is too small.

Example bug (wrong error code): #199

For all API functions that take an output buffer, there should be at least one test that expects `PSA_ERROR_BUFFER_TOO_SMALL` with parameters that are correct except for one output buffer which is too small.

### Issue request type

[ ] Question
[x] Enhancement
[ ] Bug

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the BUFFER_TOO_SMALL behavior described here and the example bug in issue #199, then identify the PSA API functions that accept output buffers. Add coverage for each relevant function using otherwise-correct parameters and a too-small output buffer. Done means each case expects PSA_ERROR_BUFFER_TOO_SMALL.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.