Changes in kernel/test/test.c [e98f1c3e:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/test.c
re98f1c3e r9d58539 34 34 35 35 #include <test.h> 36 #include <str.h>37 36 38 37 bool test_quiet; … … 42 41 #include <avltree/avltree1.def> 43 42 #include <btree/btree1.def> 44 #include <cht/cht1.def>45 43 #include <debug/mips1.def> 46 44 #include <fault/fault1.def> … … 52 50 #include <synch/semaphore1.def> 53 51 #include <synch/semaphore2.def> 54 #include <synch/rcu1.def>55 #include <synch/workqueue2.def>56 #include <synch/workqueue3.def>57 52 #include <print/print1.def> 58 53 #include <print/print2.def> … … 61 56 #include <print/print5.def> 62 57 #include <thread/thread1.def> 63 #include <smpcall/smpcall1.def>64 58 { 65 59 .name = NULL, … … 69 63 }; 70 64 71 const char *tests_hints_enum(const char *input, const char **help,72 void **ctx)73 {74 size_t len = str_length(input);75 test_t **test = (test_t **) ctx;76 77 if (*test == NULL)78 *test = tests;79 80 for (; (*test)->name; (*test)++) {81 const char *curname = (*test)->name;82 83 if (str_length(curname) < len)84 continue;85 86 if (str_lcmp(input, curname, len) == 0) {87 (*test)++;88 if (help)89 *help = (*test)->desc;90 return (curname + str_lsize(curname, len));91 }92 }93 94 return NULL;95 }96 97 65 /** @} 98 66 */
Note:
See TracChangeset
for help on using the changeset viewer.