| 72 | } |
| 73 | |
| 74 | static void |
| 75 | testsuite_run_test(int (*test)(void), const char *name) |
| 76 | { |
| 77 | int ret = 0; |
| 78 | |
| 79 | if (test) { |
| 80 | ret = test(); |
| 81 | if (ret < 0) { |
| 82 | failed++; |
| 83 | printf("%s Failed\n", name); |
| 84 | } else { |
| 85 | passed++; |
| 86 | printf("%s Passed\n", name); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | total++; |
| 91 | } |
| 92 | |
| 93 | static int |
| 94 | test_dma_get_dev_id_by_name(void) |