2 * Copyright (C) 2013 Andrea Mazzoleni
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
19 * Tests insertion function.
21 * Test raid_insert() with all the possible combinations of elements to insert.
23 * Returns 0 on success.
25 int raid_test_insert(void);
28 * Tests sorting function.
30 * Test raid_sort() with all the possible combinations of elements to sort.
32 * Returns 0 on success.
34 int raid_test_sort(void);
37 * Tests combination functions.
39 * Tests combination_first() and combination_next() for all the parity levels.
41 * Returns 0 on success.
43 int raid_test_combo(void);
46 * Tests recovering functions.
48 * All the recovering functions are tested with all the combinations
49 * of failing disks and recovering parities.
51 * Take care that the test time grows exponentially with the number of disks.
53 * Returns 0 on success.
55 int raid_test_rec(unsigned mode, int nd, size_t size);
58 * Tests parity generation functions.
60 * All the parity generation functions are tested with the specified
63 * Returns 0 on success.
65 int raid_test_par(unsigned mode, int nd, size_t size);