.has_arg = no_argument,
.val = 'T',
},
+ {
+ .name = (char *) "crctest",
+ .has_arg = optional_argument,
+ .val = 'G',
+ },
{
.name = (char *) "idle-prof",
.has_arg = required_argument,
free_threads_shm();
}
+ options_free(fio_options, &def_thread);
scleanup();
}
void td_fill_rand_seeds(struct thread_data *td)
{
+ if (td->o.allrand_repeatable) {
+ for (int i = 0; i < FIO_RAND_NR_OFFS; i++)
+ td->rand_seeds[i] = FIO_RANDSEED * td->thread_number
+ + i;
+ }
+
if (td->o.use_os_rand)
td_fill_rand_seeds_os(td);
else
td_new->o.new_group = 0;
if (file_alloced) {
- td_new->o.filename = NULL;
td_new->files_index = 0;
td_new->files_size = 0;
- td_new->files = NULL;
+ if (td_new->files) {
+ struct fio_file *f;
+ for_each_file(td_new, f, i) {
+ if (f->file_name)
+ free(f->file_name);
+ free(f);
+ }
+ td_new->files = NULL;
+ }
+ if (td_new->o.filename) {
+ free(td_new->o.filename);
+ td_new->o.filename = NULL;
+ }
}
job_add_num = numjobs - 1;
printf(" --version\t\tPrint version info and exit\n");
printf(" --help\t\tPrint this page\n");
printf(" --cpuclock-test\tPerform test/validation of CPU clock\n");
+ printf(" --crctest\t\tTest speed of checksum functions\n");
printf(" --cmdhelp=cmd\t\tPrint command help, \"all\" for all of"
" them\n");
printf(" --enghelp=engine\tPrint ioengine help, or list"
fio_client_add_cmd_option(client, opt);
}
+extern int fio_crctest(const char *);
+
int parse_cmd_line(int argc, char *argv[], int client_type)
{
struct thread_data *td = NULL;
do_exit++;
exit_val = fio_monotonic_clocktest();
break;
+ case 'G':
+ do_exit++;
+ exit_val = fio_crctest(optarg);
+ break;
case 'L': {
long long val;