Add new timing test suite that runs the timing self test
This commit is contained in:
parent
81c60910e1
commit
50157ff5ab
4 changed files with 23 additions and 1 deletions
|
@ -95,6 +95,7 @@ add_test_suite(pkparse)
|
|||
add_test_suite(pkwrite)
|
||||
add_test_suite(shax)
|
||||
add_test_suite(ssl)
|
||||
add_test_suite(timing)
|
||||
add_test_suite(rsa)
|
||||
add_test_suite(version)
|
||||
add_test_suite(xtea)
|
||||
|
|
|
@ -81,7 +81,7 @@ APPS = test_suite_aes.ecb$(EXEXT) test_suite_aes.cbc$(EXEXT) \
|
|||
test_suite_pkparse$(EXEXT) test_suite_pkwrite$(EXEXT) \
|
||||
test_suite_pk$(EXEXT) \
|
||||
test_suite_rsa$(EXEXT) test_suite_shax$(EXEXT) \
|
||||
test_suite_ssl$(EXEXT) \
|
||||
test_suite_ssl$(EXEXT) test_suite_timing$(EXEXT) \
|
||||
test_suite_x509parse$(EXEXT) test_suite_x509write$(EXEXT) \
|
||||
test_suite_xtea$(EXEXT) test_suite_version$(EXEXT)
|
||||
|
||||
|
@ -412,6 +412,10 @@ test_suite_ssl$(EXEXT): test_suite_ssl.c $(DEP)
|
|||
echo " CC $<"
|
||||
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
test_suite_timing$(EXEXT): test_suite_timing.c $(DEP)
|
||||
echo " CC $<"
|
||||
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
test_suite_x509parse$(EXEXT): test_suite_x509parse.c $(DEP)
|
||||
echo " CC $<"
|
||||
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
|
2
tests/suites/test_suite_timing.data
Normal file
2
tests/suites/test_suite_timing.data
Normal file
|
@ -0,0 +1,2 @@
|
|||
Timing selftest
|
||||
timing_selftest:
|
15
tests/suites/test_suite_timing.function
Normal file
15
tests/suites/test_suite_timing.function
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* BEGIN_HEADER */
|
||||
#include "mbedtls/timing.h"
|
||||
/* END_HEADER */
|
||||
|
||||
/* BEGIN_DEPENDENCIES
|
||||
* depends_on:MBEDTLS_TIMING_C
|
||||
* END_DEPENDENCIES
|
||||
*/
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */
|
||||
void timing_selftest()
|
||||
{
|
||||
TEST_ASSERT( mbedtls_timing_self_test( 0 ) == 0 );
|
||||
}
|
||||
/* END_CASE */
|
Loading…
Reference in a new issue