a4256c1b2d
At least twice, we added a classification flag but forgot to test it in the relevant test functions. Add some protection so that this doesn't happen again. In each classification category, put a macro xxx_FLAG_MASK_PLUS_ONE at the end. In the corresponding test function, keep track of the flags that are tested, and check that their mask is xxx_FLAG_MASK_PLUS_ONE - 1 which is all the bits of the previous flags set. Now, if we add a flag without testing it, the test TEST_EQUAL( classification_flags_tested, xxx_FLAG_MASK_PLUS_ONE - 1 ) will fail. It will also fail if we make the set of flag numbers non-consecutive, which is ok. This reveals that three algorithm flags had been added but not tested (in two separate occasions). Also, one key type flag that is no longer used by the library was still defined but not tested, which is not a test gap but is inconsistent. It's for DSA, which is relevant to the PSA encoding even if Mbed TLS doesn't implement it, so keep the flag and do test it. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
||
---|---|---|
.. | ||
.jenkins | ||
configs | ||
data_files | ||
docker/bionic | ||
git-scripts | ||
include | ||
scripts | ||
src | ||
suites | ||
.gitignore | ||
CMakeLists.txt | ||
compat-in-docker.sh | ||
compat.sh | ||
context-info.sh | ||
Descriptions.txt | ||
make-in-docker.sh | ||
Makefile | ||
ssl-opt-in-docker.sh | ||
ssl-opt.sh |