Lines Matching +full:stdout +full:- +full:path

1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
16 int i, set_len = 0, new_len, num, start = 0, end = -1; in parse_num_list()
24 return -errno; in parse_num_list()
31 if (!parsing_end && *next == '-') { in parse_num_list()
44 return -EINVAL; in parse_num_list()
48 return -EINVAL; in parse_num_list()
55 return -ENOMEM; in parse_num_list()
67 return -EINVAL; in parse_num_list()
83 for (i = 0; i < set->cnt; i++) { in do_insert_test()
84 test = &set->tests[i]; in do_insert_test()
86 if (strcmp(test_str, test->name) == 0) { in do_insert_test()
92 tmp = realloc(set->tests, sizeof(*test) * (set->cnt + 1)); in do_insert_test()
94 return -ENOMEM; in do_insert_test()
96 set->tests = tmp; in do_insert_test()
97 test = &set->tests[set->cnt]; in do_insert_test()
99 test->name = test_str; in do_insert_test()
100 test->subtests = NULL; in do_insert_test()
101 test->subtest_cnt = 0; in do_insert_test()
103 set->cnt++; in do_insert_test()
109 for (i = 0; i < test->subtest_cnt; i++) { in do_insert_test()
110 if (strcmp(subtest_str, test->subtests[i]) == 0) { in do_insert_test()
116 ctmp = realloc(test->subtests, in do_insert_test()
117 sizeof(*test->subtests) * (test->subtest_cnt + 1)); in do_insert_test()
119 return -ENOMEM; in do_insert_test()
121 test->subtests = ctmp; in do_insert_test()
122 test->subtests[test->subtest_cnt] = subtest_str; in do_insert_test()
124 test->subtest_cnt++; in do_insert_test()
169 return -ENOMEM; in insert_test()
172 int parse_test_list_file(const char *path, in parse_test_list_file() argument
181 f = fopen(path, "r"); in parse_test_list_file()
183 err = -errno; in parse_test_list_file()
184 fprintf(stderr, "Failed to open '%s': %d\n", path, err); in parse_test_list_file()
188 while (getline(&buf, &buflen, f) != -1) { in parse_test_list_file()
227 return -ENOMEM; in parse_test_list()
247 printf("failed to get link info: %d\n", -errno); in link_info_prog_id()
250 return info->prog_id; in link_info_prog_id()
268 return -errno; in bpf_prog_test_load()
272 err = -ENOENT; in bpf_prog_test_load()
319 "return default value: 5000\n", -errno); in read_perf_max_sample_freq()
324 "return default value: 5000\n", -errno); in read_perf_max_sample_freq()
344 fprintf(stdout, "Failed to trigger kernel-side RCU sync!\n"); in unload_bpf_testmod()
348 fprintf(stdout, "bpf_testmod.ko is already unloaded.\n"); in unload_bpf_testmod()
349 return -1; in unload_bpf_testmod()
351 fprintf(stdout, "Failed to unload bpf_testmod.ko from kernel: %d\n", -errno); in unload_bpf_testmod()
352 return -1; in unload_bpf_testmod()
355 fprintf(stdout, "Successfully unloaded bpf_testmod.ko.\n"); in unload_bpf_testmod()
364 fprintf(stdout, "Loading bpf_testmod.ko...\n"); in load_bpf_testmod()
368 fprintf(stdout, "Can't find bpf_testmod.ko kernel module: %d\n", -errno); in load_bpf_testmod()
369 return -ENOENT; in load_bpf_testmod()
372 fprintf(stdout, "Failed to load bpf_testmod.ko into the kernel: %d\n", -errno); in load_bpf_testmod()
374 return -EINVAL; in load_bpf_testmod()
379 fprintf(stdout, "Successfully loaded bpf_testmod.ko.\n"); in load_bpf_testmod()