From 14b91e8e228fb3cd766842e894215db126ed6291 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 17 Dec 2018 14:13:36 +0000 Subject: [PATCH] Move testing of mbedtls_aria_free() to separate test The test that mbedtls_aria_free() accepts NULL parameters can be performed even if MBEDTLS_CHECK_PARAMS is unset, but was previously included in the test case aria_invalid_params() which is only executed if MBEDTLS_CHECK_PARAMS is set. --- tests/suites/test_suite_aria.data | 5 ++++- tests/suites/test_suite_aria.function | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/suites/test_suite_aria.data b/tests/suites/test_suite_aria.data index 5a92ee9c7..2da0b30c2 100644 --- a/tests/suites/test_suite_aria.data +++ b/tests/suites/test_suite_aria.data @@ -1,4 +1,7 @@ -Parameter validation +ARIA - Valid parameters +aria_valid_param: + +ARIA - Invalid parameters aria_invalid_param: ARIA-128-ECB Encrypt - RFC 5794 diff --git a/tests/suites/test_suite_aria.function b/tests/suites/test_suite_aria.function index 8ceb5bb08..6e29e535f 100644 --- a/tests/suites/test_suite_aria.function +++ b/tests/suites/test_suite_aria.function @@ -16,6 +16,13 @@ * END_DEPENDENCIES */ +/* BEGIN_CASE */ +void aria_valid_param( ) +{ + TEST_VALID_PARAM( mbedtls_aria_free( NULL ) ); +} +/* END_CASE */ + /* BEGIN_CASE depends_on:MBEDTLS_CHECK_PARAMS:!MBEDTLS_PARAM_FAILED_ALT */ void aria_invalid_param( ) { @@ -27,7 +34,6 @@ void aria_invalid_param( ) size_t iv_off = 0; TEST_INVALID_PARAM( mbedtls_aria_init( NULL ) ); - TEST_VALID_PARAM( mbedtls_aria_free( NULL ) ); TEST_INVALID_PARAM_RET( MBEDTLS_ERR_ARIA_BAD_INPUT_DATA, mbedtls_aria_setkey_enc( NULL, key,