perf tests: Fix indexing when invoking subtests
[linux-2.6-microblaze.git] / tools / perf / tests / builtin-test.c
index 2bde505..d7a5e1b 100644 (file)
@@ -385,7 +385,7 @@ static int test_and_print(struct test *t, bool force_skip, int subtest)
        if (!t->subtest.get_nr)
                pr_debug("%s:", t->desc);
        else
-               pr_debug("%s subtest %d:", t->desc, subtest);
+               pr_debug("%s subtest %d:", t->desc, subtest + 1);
 
        switch (err) {
        case TEST_OK:
@@ -422,7 +422,7 @@ static const char *shell_test__description(char *description, size_t size,
 
 #define for_each_shell_test(dir, base, ent)    \
        while ((ent = readdir(dir)) != NULL)    \
-               if (!is_directory(base, ent))
+               if (!is_directory(base, ent) && ent->d_name[0] != '.')
 
 static const char *shell_tests__dir(char *path, size_t size)
 {