aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/builtin-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r--tools/perf/tests/builtin-test.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 6f8b01bc6033..ac655b0700e7 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -154,6 +154,18 @@ static struct test {
154 .func = test__hists_cumulate, 154 .func = test__hists_cumulate,
155 }, 155 },
156 { 156 {
157 .desc = "Test tracking with sched_switch",
158 .func = test__switch_tracking,
159 },
160 {
161 .desc = "Filter fds with revents mask in a fdarray",
162 .func = test__fdarray__filter,
163 },
164 {
165 .desc = "Add fd to a fdarray, making it autogrow",
166 .func = test__fdarray__add,
167 },
168 {
157 .func = NULL, 169 .func = NULL,
158 }, 170 },
159}; 171};
@@ -185,9 +197,11 @@ static bool perf_test__matches(int curr, int argc, const char *argv[])
185static int run_test(struct test *test) 197static int run_test(struct test *test)
186{ 198{
187 int status, err = -1, child = fork(); 199 int status, err = -1, child = fork();
200 char sbuf[STRERR_BUFSIZE];
188 201
189 if (child < 0) { 202 if (child < 0) {
190 pr_err("failed to fork test: %s\n", strerror(errno)); 203 pr_err("failed to fork test: %s\n",
204 strerror_r(errno, sbuf, sizeof(sbuf)));
191 return -1; 205 return -1;
192 } 206 }
193 207
@@ -297,7 +311,7 @@ int cmd_test(int argc, const char **argv, const char *prefix __maybe_unused)
297 symbol_conf.sort_by_name = true; 311 symbol_conf.sort_by_name = true;
298 symbol_conf.try_vmlinux_path = true; 312 symbol_conf.try_vmlinux_path = true;
299 313
300 if (symbol__init() < 0) 314 if (symbol__init(NULL) < 0)
301 return -1; 315 return -1;
302 316
303 if (skip != NULL) 317 if (skip != NULL)