diff --git a/raid/internal.h b/raid/internal.h index dde9d3fe..ba2f35f6 100644 --- a/raid/internal.h +++ b/raid/internal.h @@ -105,9 +105,10 @@ static __always_inline void *__align_ptr(void *ptr, uintptr_t size) } /* - * Includes the main interface header. + * Includes the main interface headers. */ #include "raid.h" +#include "helper.h" /* * Internal functions. diff --git a/raid/test.c b/raid/test.c index 7b2fe9b8..feb8a415 100644 --- a/raid/test.c +++ b/raid/test.c @@ -13,7 +13,6 @@ */ #include "internal.h" -#include "helper.h" #include "cpu.h" #include "combo.h" #include "memory.h" diff --git a/raid/test/Makefile b/raid/test/Makefile index c33acb72..1d7ede06 100644 --- a/raid/test/Makefile +++ b/raid/test/Makefile @@ -65,11 +65,11 @@ sdecovtest: $(MAKE) clean $(MAKE) lcov_reset $(MAKE) COVERAGE=1 all - $(SDE) -p4 -- ./fulltest + $(SDE) -p4p -- ./fulltest $(SDE) -mrm -- ./fulltest $(SDE) -nhm -- ./fulltest $(SDE) -hsw -- ./fulltest - $(SDE) -p4 -- ./selftest + $(SDE) -p4p -- ./selftest $(SDE) -mrm -- ./selftest $(SDE) -nhm -- ./selftest $(SDE) -hsw -- ./selftest diff --git a/raid/test/fulltest.c b/raid/test/fulltest.c index fd9d0278..d484e5a3 100644 --- a/raid/test/fulltest.c +++ b/raid/test/fulltest.c @@ -56,35 +56,69 @@ int main(void) printf("\nPlease wait about 60 seconds...\n\n"); printf("Test sorting...\n"); - if (raid_test_sort() != 0) + if (raid_test_sort() != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("Test insertion...\n"); - if (raid_test_insert() != 0) + if (raid_test_insert() != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("Test combinations/permutations...\n"); - if (raid_test_combo() != 0) + if (raid_test_combo() != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("Test Cauchy parity generation with %u data disks...\n", RAID_DATA_MAX); - if (raid_test_par(RAID_MODE_CAUCHY, RAID_DATA_MAX, TEST_SIZE) != 0) + if (raid_test_par(RAID_MODE_CAUCHY, RAID_DATA_MAX, TEST_SIZE) != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("Test Cauchy parity generation with 1 data disk...\n"); - if (raid_test_par(RAID_MODE_CAUCHY, 1, TEST_SIZE) != 0) + if (raid_test_par(RAID_MODE_CAUCHY, 1, TEST_SIZE) != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("Test Cauchy recovering with all combinations of %u data and 6 parity blocks...\n", TEST_COUNT); - if (raid_test_rec(RAID_MODE_CAUCHY, TEST_COUNT, TEST_SIZE) != 0) + if (raid_test_rec(RAID_MODE_CAUCHY, TEST_COUNT, TEST_SIZE) != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("Test Vandermonde parity generation with %u data disks...\n", RAID_DATA_MAX); - if (raid_test_par(RAID_MODE_VANDERMONDE, RAID_DATA_MAX, TEST_SIZE) != 0) + if (raid_test_par(RAID_MODE_VANDERMONDE, RAID_DATA_MAX, TEST_SIZE) != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("Test Vandermonde recovering with all combinations of %u data and 3 parity blocks...\n", TEST_COUNT); - if (raid_test_rec(RAID_MODE_VANDERMONDE, TEST_COUNT, TEST_SIZE) != 0) + if (raid_test_rec(RAID_MODE_VANDERMONDE, TEST_COUNT, TEST_SIZE) != 0) { + /* LCOV_EXCL_START */ goto bail; + /* LCOV_EXCL_STOP */ + } + printf("OK\n"); return 0; bail: + /* LCOV_EXCL_START */ printf("FAILED!\n"); exit(EXIT_FAILURE); + /* LCOV_EXCL_STOP */ } diff --git a/raid/test/selftest.c b/raid/test/selftest.c index 1fe6bf43..32bd5a48 100644 --- a/raid/test/selftest.c +++ b/raid/test/selftest.c @@ -28,8 +28,10 @@ int main(void) printf("Self test...\n"); if (raid_selftest() != 0) { + /* LCOV_EXCL_START */ printf("FAILED!\n"); exit(EXIT_FAILURE); + /* LCOV_EXCL_STOP */ } printf("OK\n\n");