Lines Matching full:set

6 static void init_test_filter_set(struct test_filter_set *set)  in init_test_filter_set()  argument
8 set->cnt = 0; in init_test_filter_set()
9 set->tests = NULL; in init_test_filter_set()
12 static void free_test_filter_set(struct test_filter_set *set) in free_test_filter_set() argument
16 for (i = 0; i < set->cnt; i++) { in free_test_filter_set()
17 for (j = 0; j < set->tests[i].subtest_cnt; j++) in free_test_filter_set()
18 free((void *)set->tests[i].subtests[j]); in free_test_filter_set()
19 free(set->tests[i].subtests); in free_test_filter_set()
20 free(set->tests[i].name); in free_test_filter_set()
23 free(set->tests); in free_test_filter_set()
24 init_test_filter_set(set); in free_test_filter_set()
29 struct test_filter_set set; in test_parse_test_list() local
31 init_test_filter_set(&set); in test_parse_test_list()
33 ASSERT_OK(parse_test_list("arg_parsing", &set, true), "parsing"); in test_parse_test_list()
34 if (!ASSERT_EQ(set.cnt, 1, "test filters count")) in test_parse_test_list()
36 if (!ASSERT_OK_PTR(set.tests, "test filters initialized")) in test_parse_test_list()
38 ASSERT_EQ(set.tests[0].subtest_cnt, 0, "subtest filters count"); in test_parse_test_list()
39 ASSERT_OK(strcmp("arg_parsing", set.tests[0].name), "subtest name"); in test_parse_test_list()
40 free_test_filter_set(&set); in test_parse_test_list()
42 ASSERT_OK(parse_test_list("arg_parsing,bpf_cookie", &set, true), in test_parse_test_list()
44 if (!ASSERT_EQ(set.cnt, 2, "count of test filters")) in test_parse_test_list()
46 if (!ASSERT_OK_PTR(set.tests, "test filters initialized")) in test_parse_test_list()
48 ASSERT_EQ(set.tests[0].subtest_cnt, 0, "subtest filters count"); in test_parse_test_list()
49 ASSERT_EQ(set.tests[1].subtest_cnt, 0, "subtest filters count"); in test_parse_test_list()
50 ASSERT_OK(strcmp("arg_parsing", set.tests[0].name), "test name"); in test_parse_test_list()
51 ASSERT_OK(strcmp("bpf_cookie", set.tests[1].name), "test name"); in test_parse_test_list()
52 free_test_filter_set(&set); in test_parse_test_list()
55 &set, in test_parse_test_list()
58 if (!ASSERT_EQ(set.cnt, 2, "count of test filters")) in test_parse_test_list()
60 if (!ASSERT_OK_PTR(set.tests, "test filters initialized")) in test_parse_test_list()
62 if (!ASSERT_EQ(set.tests[0].subtest_cnt, 1, "subtest filters count")) in test_parse_test_list()
64 ASSERT_EQ(set.tests[1].subtest_cnt, 0, "subtest filters count"); in test_parse_test_list()
65 ASSERT_OK(strcmp("arg_parsing", set.tests[0].name), "test name"); in test_parse_test_list()
66 ASSERT_OK(strcmp("arg_parsing", set.tests[0].subtests[0]), in test_parse_test_list()
68 ASSERT_OK(strcmp("bpf_cookie", set.tests[1].name), "test name"); in test_parse_test_list()
69 free_test_filter_set(&set); in test_parse_test_list()
71 ASSERT_OK(parse_test_list("arg_parsing/arg_parsing", &set, true), in test_parse_test_list()
73 ASSERT_OK(parse_test_list("bpf_cookie", &set, true), "parsing"); in test_parse_test_list()
74 ASSERT_OK(parse_test_list("send_signal", &set, true), "parsing"); in test_parse_test_list()
75 if (!ASSERT_EQ(set.cnt, 3, "count of test filters")) in test_parse_test_list()
77 if (!ASSERT_OK_PTR(set.tests, "test filters initialized")) in test_parse_test_list()
79 if (!ASSERT_EQ(set.tests[0].subtest_cnt, 1, "subtest filters count")) in test_parse_test_list()
81 ASSERT_EQ(set.tests[1].subtest_cnt, 0, "subtest filters count"); in test_parse_test_list()
82 ASSERT_EQ(set.tests[2].subtest_cnt, 0, "subtest filters count"); in test_parse_test_list()
83 ASSERT_OK(strcmp("arg_parsing", set.tests[0].name), "test name"); in test_parse_test_list()
84 ASSERT_OK(strcmp("arg_parsing", set.tests[0].subtests[0]), in test_parse_test_list()
86 ASSERT_OK(strcmp("bpf_cookie", set.tests[1].name), "test name"); in test_parse_test_list()
87 ASSERT_OK(strcmp("send_signal", set.tests[2].name), "test name"); in test_parse_test_list()
88 free_test_filter_set(&set); in test_parse_test_list()
90 ASSERT_OK(parse_test_list("bpf_cookie/trace", &set, false), "parsing"); in test_parse_test_list()
91 if (!ASSERT_EQ(set.cnt, 1, "count of test filters")) in test_parse_test_list()
93 if (!ASSERT_OK_PTR(set.tests, "test filters initialized")) in test_parse_test_list()
95 if (!ASSERT_EQ(set.tests[0].subtest_cnt, 1, "subtest filters count")) in test_parse_test_list()
97 ASSERT_OK(strcmp("*bpf_cookie*", set.tests[0].name), "test name"); in test_parse_test_list()
98 ASSERT_OK(strcmp("*trace*", set.tests[0].subtests[0]), "subtest name"); in test_parse_test_list()
100 free_test_filter_set(&set); in test_parse_test_list()