Lines Matching refs:attr
39 const char *(*to_string)(void *attr, bool *to_free);
40 int (*filter)(void *attr, const char *input, int *err);
51 static const char *attr_enum_to_string(void *attr, const char * const str_list[], bool *to_free) in attr_enum_to_string() argument
53 long val = (long)attr; in attr_enum_to_string()
61 static const char *attr_speed_to_string(void *attr, bool *to_free) in attr_speed_to_string() argument
63 return attr_enum_to_string(attr, speed_str_list, to_free); in attr_speed_to_string()
66 static const char *attr_string_to_string(void *attr, bool *to_free) in attr_string_to_string() argument
69 return (char *) attr; in attr_string_to_string()
104 static int attr_enum_filter(void *attr, const char *input, int *err, in attr_enum_filter() argument
108 long test_val = (long)attr; in attr_enum_filter()
138 static int attr_speed_filter(void *attr, const char *input, int *err) in attr_speed_filter() argument
140 return attr_enum_filter(attr, input, err, speed_str_list, KUNIT_SPEED_MAX); in attr_speed_filter()
147 static int attr_string_filter(void *attr, const char *input, int *err) in attr_string_filter() argument
149 char *str = attr; in attr_string_filter()
178 return ((void *) test->attr.speed); in attr_speed_get()
180 return ((void *) suite->attr.speed); in attr_speed_get()
222 return filter.attr->name; in kunit_attr_filter_name()
229 void *attr; in kunit_print_attr() local
238 attr = kunit_attr_list[i].get_attr(test_or_suite, is_test); in kunit_print_attr()
239 if (attr) { in kunit_print_attr()
241 attr_str = kunit_attr_list[i].to_string(attr, &to_free); in kunit_print_attr()
320 filter.attr = &kunit_attr_list[attr_index]; in kunit_next_attr_filter()
362 default_result = filter.attr->filter(filter.attr->attr_default, filter.input, err); in kunit_filter_attr_tests()
367 suite_val = filter.attr->get_attr((void *)suite, false); in kunit_filter_attr_tests()
368 suite_result = filter.attr->filter(suite_val, filter.input, err); in kunit_filter_attr_tests()
374 test_val = filter.attr->get_attr((void *) test_case, true); in kunit_filter_attr_tests()
375 test_result = filter.attr->filter(filter.attr->get_attr(test_case, true), in kunit_filter_attr_tests()