Commit e30ff7fa authored by Davide Galassi's avatar Davide Galassi

Malloc mock first application to MPI tests

parent af0471c0
#include "test.h"
#include "malloc_mock.h"
#include <cry/mpi.h>
#include <stdlib.h>
cry_mpi *g_mpi_buf;
#define g_mpi0 (&g_mpi_buf[0])
#define g_mpi1 (&g_mpi_buf[1])
......@@ -225,11 +225,27 @@ static void mpi_dispatch(int argc, char *argv[])
mpi_teardown();
}
static void mul_karatsuba(void)
{
char *argv[] = {
"mpi_mul_karatsuba",
"12345678",
"12345678",
"Z-1"
};
g_malloc_mock_count = 9;
mpi_dispatch(4, argv);
}
static void coverage(void)
{
mul_karatsuba();
}
void mpi_test(void)
{
printf("* MPI\n");
func_test("mpi_test.data", mpi_dispatch);
//func_test("mpi_test.data", mpi_dispatch);
coverage();
printf("\n");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment