mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
More raid coverage extensions
This commit is contained in:
parent
a60e7a9bb5
commit
b0891290eb
5 changed files with 48 additions and 12 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "helper.h"
|
||||
#include "cpu.h"
|
||||
#include "combo.h"
|
||||
#include "memory.h"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue