Lines Matching refs:args
74 if (test->args->flags & CLD_FLG_W) { in linear_read_write_test()
76 *(pVal1 + OFF_WLBA) = test->args->start_lba; in linear_read_write_test()
77 test->args->test_state = DIRCT_INC(test->args->test_state); in linear_read_write_test()
79 test->args->test_state = SET_OPER_W(test->args->test_state); in linear_read_write_test()
80 test->args->test_state = SET_wFST_TIME(test->args->test_state); in linear_read_write_test()
83 sizeof(action_t) * test->args->t_kids); in linear_read_write_test()
87 if (test->args->flags & CLD_FLG_CYC) in linear_read_write_test()
88 if (test->args->cycles == 0) { in linear_read_write_test()
89 pMsg(INFO, test->args, in linear_read_write_test()
93 pMsg(INFO, test->args, in linear_read_write_test()
96 test->args->cycles); in linear_read_write_test()
98 pMsg(INFO, test->args, "Starting write pass\n"); in linear_read_write_test()
101 for (i = 0; i < test->args->t_kids; i++) { in linear_read_write_test()
109 if (!(TST_STS(test->args->test_state))) { in linear_read_write_test()
113 if (test->args->flags & CLD_FLG_R) { in linear_read_write_test()
115 *(pVal1 + OFF_RLBA) = test->args->start_lba; in linear_read_write_test()
116 test->args->test_state = DIRCT_INC(test->args->test_state); in linear_read_write_test()
118 test->args->test_state = SET_OPER_R(test->args->test_state); in linear_read_write_test()
119 test->args->test_state = SET_rFST_TIME(test->args->test_state); in linear_read_write_test()
122 sizeof(action_t) * test->args->t_kids); in linear_read_write_test()
126 if (test->args->flags & CLD_FLG_CYC) in linear_read_write_test()
127 if (test->args->cycles == 0) { in linear_read_write_test()
128 pMsg(INFO, test->args, in linear_read_write_test()
132 pMsg(INFO, test->args, in linear_read_write_test()
135 test->args->cycles); in linear_read_write_test()
137 pMsg(INFO, test->args, "Starting read pass\n"); in linear_read_write_test()
140 for (i = 0; i < test->args->t_kids; i++) { in linear_read_write_test()
157 pMsg(ERR, test->args, in init_data()
164 pMsg(ERR, test->args, in init_data()
171 pMsg(ERR, test->args, in init_data()
184 if (test->args->seed == 0) in init_data()
185 test->args->seed = test->args->pid; in init_data()
186 srand(test->args->seed); in init_data()
191 (((((size_t) test->args->vsiz)) / 8) == in init_data()
192 0) ? 1 : ((((size_t) test->args->vsiz)) / 8); in init_data()
193 if ((test->args->vsiz / 8) != 0) in init_data()
197 data_buffer_size = ((test->args->htrsiz * BLK_SIZE) * 2); in init_data()
200 pMsg(ERR, test->args, in init_data()
206 (action_t *) ALLOC(sizeof(action_t) * test->args->t_kids)) == in init_data()
208 pMsg(ERR, test->args, in init_data()
218 pMsg(ERR, test->args, "Failed to allocate bitmap memory\n"); in init_data()
225 sizeof(action_t) * test->args->t_kids); in init_data()
229 *(pVal1 + OFF_WLBA) = test->args->start_lba; in init_data()
230 *(pVal1 + OFF_RLBA) = test->args->start_lba; in init_data()
231 test->args->test_state = SET_STS_PASS(test->args->test_state); in init_data()
232 test->args->test_state = SET_wFST_TIME(test->args->test_state); in init_data()
233 test->args->test_state = SET_rFST_TIME(test->args->test_state); in init_data()
234 test->args->test_state = DIRCT_INC(test->args->test_state); in init_data()
235 if (test->args->flags & CLD_FLG_W) { in init_data()
237 test->args->test_state = SET_OPER_W(test->args->test_state); in init_data()
240 test->args->test_state = SET_OPER_R(test->args->test_state); in init_data()
244 switch (test->args->flags & CLD_FLG_PTYPS) { in init_data()
246 for (i = 0; i < sizeof(test->args->pattern); i++) { in init_data()
247 if ((test->args-> in init_data()
249 (((sizeof(test->args->pattern) - 1) - in init_data()
254 if (i == sizeof(test->args->pattern)) in init_data()
257 &test->args->pattern, in init_data()
258 sizeof(test->args->pattern) - i, CLD_FLG_FPTYPE); in init_data()
270 pMsg(WARN, test->args, "Unknown fill pattern\n"); in init_data()
296 test->args->pid = GETPID(); in threadedMain()
300 if (make_assumptions(test->args) < 0) { in threadedMain()
303 if (check_conclusions(test->args) < 0) { in threadedMain()
306 if (test->args->flags & CLD_FLG_DUMP) { in threadedMain()
311 do_dump(test->args); in threadedMain()
321 pMsg(START, test->args, "Start args: %s\n", test->args->argstr); in threadedMain()
329 if (test->args->flags & CLD_FLG_RPTYPE) { /* force random data to be different each cycle */ in threadedMain()
331 ((test->args->htrsiz * BLK_SIZE) * 2), NULL, in threadedMain()
336 if ((test->args->flags & CLD_FLG_LINEAR) in threadedMain()
337 && !(test->args->flags & CLD_FLG_NTRLVD)) { in threadedMain()
342 test->env->start_time + test->args->run_time; in threadedMain()
344 *(pVal1 + OFF_WLBA) = test->args->start_lba; in threadedMain()
345 test->args->test_state = in threadedMain()
346 DIRCT_INC(test->args->test_state); in threadedMain()
347 test->args->test_state = in threadedMain()
348 SET_wFST_TIME(test->args->test_state); in threadedMain()
349 test->args->test_state = in threadedMain()
350 SET_rFST_TIME(test->args->test_state); in threadedMain()
351 if (test->args->flags & CLD_FLG_W) { in threadedMain()
353 test->args->test_state = in threadedMain()
354 SET_OPER_W(test->args->test_state); in threadedMain()
357 test->args->test_state = in threadedMain()
358 SET_OPER_R(test->args->test_state); in threadedMain()
361 sizeof(action_t) * test->args->t_kids); in threadedMain()
366 if (test->args->flags & CLD_FLG_CYC) in threadedMain()
367 if (test->args->cycles == 0) { in threadedMain()
368 pMsg(INFO, test->args, in threadedMain()
373 pMsg(INFO, test->args, in threadedMain()
376 pass_count, test->args->cycles); in threadedMain()
378 pMsg(INFO, test->args, "Starting pass\n"); in threadedMain()
382 for (i = 0; i < test->args->t_kids; i++) { in threadedMain()
390 if ((test->args->flags & CLD_FLG_CYC) in threadedMain()
391 && (test->args->flags & CLD_FLG_PCYC)) { in threadedMain()
392 print_stats(test->args, test->env, CYCLE); in threadedMain()
403 if (!(test->args->flags & CLD_FLG_CYC)) { in threadedMain()
406 if ((test->args->cycles > 0) in threadedMain()
407 && (test->env->pass_count >= test->args->cycles)) { in threadedMain()
411 } while (TST_STS(test->args->test_state)); in threadedMain()
412 print_stats(test->args, test->env, TOTAL); in threadedMain()
421 if (TST_STS(test->args->test_state)) { in threadedMain()
423 pMsg(END, test->args, in threadedMain()
426 pMsg(END, test->args, "Test Done (Passed)\n"); in threadedMain()
430 pMsg(END, test->args, in threadedMain()
433 pMsg(END, test->args, "Test Done (Failed)\n"); in threadedMain()
459 if ((pNewTest->args = in getNewTest()
471 FREE(pNewTest->args); in getNewTest()
475 memcpy(pNewTest->args, &cleanArgs, sizeof(child_args_t)); in getNewTest()
516 memset(newTest->args->device, 0, in run()
518 strncpy(newTest->args->device, in run()