Remove dead code
Do explain why we don't test a smaller buffer in addition to testing the
nominal size and a larger buffer.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
diff --git a/tests/suites/test_suite_psa_crypto_low_hash.function b/tests/suites/test_suite_psa_crypto_low_hash.function
index 6bdbefa..6dabcef 100644
--- a/tests/suites/test_suite_psa_crypto_low_hash.function
+++ b/tests/suites/test_suite_psa_crypto_low_hash.function
@@ -50,17 +50,9 @@
mbedtls_free(output);
output = NULL;
-#if 0
-
- /* Smaller output buffer (does not have to work!) */
- output_size = expected->len - 1;
- ASSERT_ALLOC(output, output_size);
- TEST_EQUAL(mbedtls_psa_hash_compute(alg, input->x, input->len,
- output, output_size, &length),
- PSA_ERROR_BUFFER_TOO_SMALL);
- mbedtls_free(output);
- output = NULL;
-#endif
+ /* We don't test with a smaller output buffer because this isn't
+ * guaranteed to work: the core must pass a sufficiently large
+ * output buffer to the driver. */
exit:
mbedtls_free(output);
@@ -147,18 +139,9 @@
mbedtls_free(output);
output = NULL;
-#if 0
- /* Smaller output buffer (does not have to work!) */
- TEST_EQUAL(mbedtls_psa_hash_clone(&clone_more, &clone_end),
- PSA_SUCCESS);
- output_size = expected2->len - 1;
- ASSERT_ALLOC(output, output_size);
- TEST_EQUAL(mbedtls_psa_hash_finish(&clone_end,
- output, output_size, &length),
- PSA_ERROR_BUFFER_TOO_SMALL);
- mbedtls_free(output);
- output = NULL;
-#endif
+ /* We don't test with a smaller output buffer because this isn't
+ * guaranteed to work: the core must pass a sufficiently large
+ * output buffer to the driver. */
/* Nominal case again after an error in a cloned operation */
output_size = expected2->len;