Changeset fd312d5 in mainline for uspace/app/tmon/test.c
- Timestamp:
- 2017-12-20T16:06:56Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cec130b
- Parents:
- f98f4b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tmon/test.c
rf98f4b7 rfd312d5 114 114 } 115 115 116 static int bulk_worker(devman_handle_t fun) {116 static int stress_bulk_in(devman_handle_t fun) { 117 117 async_sess_t *sess = usbdiag_connect(fun); 118 118 async_exch_t *exch = async_exchange_begin(sess); 119 119 120 // TODO: do some testing121 int y;122 int rc = usbdiag_ test(exch, 4200, &y);120 const int cycles = 1024; 121 const size_t size = 65432; 122 int rc = usbdiag_stress_bulk_in(exch, cycles, size); 123 123 124 124 if (rc) { 125 125 printf(NAME ": %s\n", str_error(rc)); 126 } else {127 printf("The number is %d.\n", y);128 126 } 129 127 … … 133 131 } 134 132 135 int tmon_test_bulk(int argc, char *argv[]) 133 static int stress_bulk_out(devman_handle_t fun) { 134 async_sess_t *sess = usbdiag_connect(fun); 135 async_exch_t *exch = async_exchange_begin(sess); 136 137 const int cycles = 1024; 138 const size_t size = 65432; 139 int rc = usbdiag_stress_bulk_out(exch, cycles, size); 140 141 if (rc) { 142 printf(NAME ": %s\n", str_error(rc)); 143 } 144 145 async_exchange_end(exch); 146 usbdiag_disconnect(sess); 147 return 0; 148 } 149 150 int tmon_stress_bulk_in(int argc, char *argv[]) 136 151 { 137 return resolve_and_test(argc, argv, bulk_worker); 152 return resolve_and_test(argc, argv, stress_bulk_in); 153 } 154 155 int tmon_stress_bulk_out(int argc, char *argv[]) 156 { 157 return resolve_and_test(argc, argv, stress_bulk_out); 138 158 } 139 159
Note:
See TracChangeset
for help on using the changeset viewer.