From ca8287cbaf78a6277c934d7493ee8acfd5a797ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 22 Jul 2020 10:29:39 +0200 Subject: [PATCH] Use test_set_step() in loop in cf_hmac test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only have a single integer available for two nested loops, but the loop sizes are small enough compared to the integer's range that we can encode both indexes. Since the integer is displayed in decimal in case of errors, use a power of 10 to pack the two indexes together. Signed-off-by: Manuel Pégourié-Gonnard --- tests/suites/test_suite_ssl.function | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index ebb9a1a57..602dc36d5 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -4100,12 +4100,16 @@ void ssl_cf_hmac( int hash ) */ for( max_in_len = 0; max_in_len <= 255 + block_size; max_in_len++ ) { + test_set_step( max_in_len * 10000 ); + /* Use allocated in buffer to catch overreads */ ASSERT_ALLOC( data, max_in_len != 0 ? max_in_len : 1 ); min_in_len = max_in_len > 255 ? max_in_len - 255 : 0; for( in_len = min_in_len; in_len <= max_in_len; in_len++ ) { + test_set_step( max_in_len * 10000 + in_len ); + /* Set up dummy data and add_data */ rec_num++; memset( add_data, rec_num, sizeof( add_data ) );