mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-24 17:06:25 -05:00
Add regression test for multi parity
This commit is contained in:
parent
0fba4722c0
commit
bec310d50b
18 changed files with 91 additions and 65 deletions
|
|
@ -290,6 +290,7 @@ void config(char* conf, size_t conf_size, const char* argv0)
|
|||
#define OPT_TEST_IO_ADVISE_DISCARD_8 298
|
||||
#define OPT_TEST_IO_ADVISE_DISCARD_32 299
|
||||
#define OPT_TEST_IO_ADVISE_DIRECT 300
|
||||
#define OPT_TEST_PARITY_LIMIT 301
|
||||
|
||||
#if HAVE_GETOPT_LONG
|
||||
struct option long_options[] = {
|
||||
|
|
@ -447,6 +448,9 @@ struct option long_options[] = {
|
|||
/* Set the io advise to direct */
|
||||
{ "test-io-advise-direct", 0, 0, OPT_TEST_IO_ADVISE_DIRECT },
|
||||
|
||||
/* Set an artificial parity limit */
|
||||
{ "test-parity-limit", 1, 0, OPT_TEST_PARITY_LIMIT },
|
||||
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
#endif
|
||||
|
|
@ -867,6 +871,9 @@ int main(int argc, char* argv[])
|
|||
case OPT_TEST_IO_ADVISE_DIRECT :
|
||||
opt.file_mode = ADVISE_DIRECT;
|
||||
break;
|
||||
case OPT_TEST_PARITY_LIMIT :
|
||||
opt.parity_limit_size = atoll(optarg);
|
||||
break;
|
||||
default :
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Unknown option '%c'\n", (char)c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue