Lines Matching refs:tp

39 int initialize_files(struct test_params* tp) {
40 src_file = reinterpret_cast<uint8_t*>(malloc(tp->filesz));
41 dst_file = reinterpret_cast<uint8_t*>(malloc(tp->filesz));
52 for (ndx = 0; ndx < tp->filesz / sizeof(int); ndx++) {
56 for (ndx = (tp->filesz / sizeof(int)) * sizeof(int);
57 ndx < tp->filesz;
252 bool run_client_test(struct test_params* tp) {
266 file_info.filesz = tp->filesz;
287 size_t buf_sz = tp->blksz > PATH_MAX ?
288 tp->blksz + 2 : PATH_MAX + 2;
297 tftp_set_options(session, &tp->blksz, NULL, &tp->winsz);
307 if (tp->direction == DIR_SEND) {
322 auto* tp = reinterpret_cast<test_params*>(arg);
323 run_client_test(tp);
329 bool run_server_test(struct test_params* tp) {
343 file_info.filesz = tp->filesz;
363 size_t buf_sz = tp->blksz > PATH_MAX ?
364 tp->blksz + 2 : PATH_MAX + 2;
387 auto* tp = reinterpret_cast<test_params*>(arg);
388 run_server_test(tp);
392 bool run_one_test(struct test_params* tp) {
394 int init_result = initialize_files(tp);
400 pthread_create(&client_thread, NULL, tftp_client_main, tp);
401 pthread_create(&server_thread, NULL, tftp_server_main, tp);
406 int compare_result = compare_files(tp->filesz);
412 struct test_params tp = {.direction = DIR_SEND, .filesz = 1000000, .winsz = 20, .blksz = 1000};
413 return run_one_test(&tp);
418 struct test_params tp = {.direction = DIR_SEND, .filesz = 2100000, .winsz = 9999, .blksz = 8};
419 return run_one_test(&tp);
424 struct test_params tp = {.direction = DIR_SEND, .filesz = 1000000, .winsz = 1024,
426 return run_one_test(&tp);
430 struct test_params tp = {.direction = DIR_RECEIVE, .filesz = 1000000, .winsz = 20,
432 return run_one_test(&tp);
437 struct test_params tp = {.direction = DIR_RECEIVE, .filesz = 2100000, .winsz = 8192,
439 return run_one_test(&tp);
444 struct test_params tp = {.direction = DIR_RECEIVE, .filesz = 1000000, .winsz = 1024,
446 return run_one_test(&tp);