From 3a798cb226c4573c23a22c1efea51b53903b6602 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 17 Sep 2014 21:35:13 +0200 Subject: [PATCH] Fixes inversion test due missing RAID init call. --- raid/test/Makefile | 4 ++-- raid/test/invtest.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/raid/test/Makefile b/raid/test/Makefile index 6c008921..4d243f60 100644 --- a/raid/test/Makefile +++ b/raid/test/Makefile @@ -9,14 +9,14 @@ # covtest - Runs a coverage test. # -CC = gcc +CC = gcc +LD = ld CFLAGS = -I.. -Wall -Wextra -g ifeq ($(COVERAGE),) CFLAGS += -O2 else CFLAGS += -O0 --coverage -DCOVERAGE=1 endif -LD = ld OBJS = raid.o int.o intz.o x86.o x86z.o tables.o memory.o test.o helper.o module.o tag.o %.o: ../%.c diff --git a/raid/test/invtest.c b/raid/test/invtest.c index 180a0527..7a3f8a29 100644 --- a/raid/test/invtest.c +++ b/raid/test/invtest.c @@ -22,6 +22,7 @@ #include #include #include +#include /** * Like raid_invert() but optimized to only check if the matrix is @@ -120,7 +121,7 @@ static __always_inline int test_sub_matrix(int nr, long long *total) if (count != expected) return -1; - printf("\rTested %lld matrix\n", count); + printf("\rTested %"PRIi64" matrix\n", count); *total += count; @@ -152,7 +153,7 @@ int test_all_sub_matrix(void) if (test_sub_matrix(6, &total) != 0) return -1; - printf("\nTested in total %lld matrix\n", total); + printf("\nTested in total %"PRIi64" matrix\n", total); return 0; } @@ -161,6 +162,9 @@ int main(void) { printf("Matrix inversion test for the RAID Cauchy library\n\n"); + /* required to set the gfgen table */ + raid_init(); + if (test_all_sub_matrix() != 0) { printf("FAILED!\n"); exit(EXIT_FAILURE);