diff options
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 766573e236e4..fafa014240cd 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -411,9 +411,9 @@ static const char *shell_test__description(char *description, size_t size, | |||
411 | return description ? trim(description + 1) : NULL; | 411 | return description ? trim(description + 1) : NULL; |
412 | } | 412 | } |
413 | 413 | ||
414 | #define for_each_shell_test(dir, ent) \ | 414 | #define for_each_shell_test(dir, base, ent) \ |
415 | while ((ent = readdir(dir)) != NULL) \ | 415 | while ((ent = readdir(dir)) != NULL) \ |
416 | if (ent->d_type == DT_REG && ent->d_name[0] != '.') | 416 | if (!is_directory(base, ent)) |
417 | 417 | ||
418 | static const char *shell_tests__dir(char *path, size_t size) | 418 | static const char *shell_tests__dir(char *path, size_t size) |
419 | { | 419 | { |
@@ -452,7 +452,7 @@ static int shell_tests__max_desc_width(void) | |||
452 | if (!dir) | 452 | if (!dir) |
453 | return -1; | 453 | return -1; |
454 | 454 | ||
455 | for_each_shell_test(dir, ent) { | 455 | for_each_shell_test(dir, path, ent) { |
456 | char bf[256]; | 456 | char bf[256]; |
457 | const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name); | 457 | const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name); |
458 | 458 | ||
@@ -504,7 +504,7 @@ static int run_shell_tests(int argc, const char *argv[], int i, int width) | |||
504 | if (!dir) | 504 | if (!dir) |
505 | return -1; | 505 | return -1; |
506 | 506 | ||
507 | for_each_shell_test(dir, ent) { | 507 | for_each_shell_test(dir, st.dir, ent) { |
508 | int curr = i++; | 508 | int curr = i++; |
509 | char desc[256]; | 509 | char desc[256]; |
510 | struct test test = { | 510 | struct test test = { |
@@ -614,7 +614,7 @@ static int perf_test__list_shell(int argc, const char **argv, int i) | |||
614 | if (!dir) | 614 | if (!dir) |
615 | return -1; | 615 | return -1; |
616 | 616 | ||
617 | for_each_shell_test(dir, ent) { | 617 | for_each_shell_test(dir, path, ent) { |
618 | int curr = i++; | 618 | int curr = i++; |
619 | char bf[256]; | 619 | char bf[256]; |
620 | struct test t = { | 620 | struct test t = { |