mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 12:15:38 +01:00
Timing self test: increased tolerance
mbedtls_timing_self_test fails annoyingly often when running on a busy machine such as can be expected of a continous integration system. Increase the tolerances in the delay test, to reduce the chance of failures that are only due to missing a deadline on a busy machine.
This commit is contained in:
parent
2a26d620fb
commit
0f59b130a9
@ -450,19 +450,19 @@ int mbedtls_timing_self_test( int verbose )
|
||||
{
|
||||
mbedtls_timing_set_delay( &ctx, a, a + b );
|
||||
|
||||
busy_msleep( a - a / 8 );
|
||||
busy_msleep( a - a / 4 );
|
||||
if( mbedtls_timing_get_delay( &ctx ) != 0 )
|
||||
FAIL;
|
||||
|
||||
busy_msleep( a / 4 );
|
||||
busy_msleep( a / 2 );
|
||||
if( mbedtls_timing_get_delay( &ctx ) != 1 )
|
||||
FAIL;
|
||||
|
||||
busy_msleep( b - a / 8 - b / 8 );
|
||||
busy_msleep( b - a / 4 - b / 4 );
|
||||
if( mbedtls_timing_get_delay( &ctx ) != 1 )
|
||||
FAIL;
|
||||
|
||||
busy_msleep( b / 4 );
|
||||
busy_msleep( b / 2 );
|
||||
if( mbedtls_timing_get_delay( &ctx ) != 2 )
|
||||
FAIL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user