Validate that test_fail causes a test failure

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-11-02 18:49:52 +01:00
parent 33406b645d
commit f309fbf0d5

View file

@ -17,6 +17,17 @@
#include <string.h>
/****************************************************************/
/* Test framework features */
/****************************************************************/
void meta_test_fail(const char *name)
{
(void) name;
mbedtls_test_fail("Forced test failure", __LINE__, __FILE__);
}
/****************************************************************/
/* Command line entry point */
/****************************************************************/
@ -28,6 +39,7 @@ typedef struct {
} metatest_t;
metatest_t metatests[] = {
{ "test_fail", "any", meta_test_fail },
{ NULL, NULL, NULL }
};