OSDN Git Service

perf test: Move each test suite struct to its test
[uclinux-h8/linux.git] / tools / perf / tests / dso-data.c
index 43e1b01..d9e060a 100644 (file)
@@ -113,7 +113,7 @@ static int dso__data_fd(struct dso *dso, struct machine *machine)
        return fd;
 }
 
-int test__dso_data(struct test *test __maybe_unused, int subtest __maybe_unused)
+static int test__dso_data(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
        struct machine machine;
        struct dso *dso;
@@ -248,7 +248,7 @@ static int set_fd_limit(int n)
        return setrlimit(RLIMIT_NOFILE, &rlim);
 }
 
-int test__dso_data_cache(struct test *test __maybe_unused, int subtest __maybe_unused)
+static int test__dso_data_cache(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
        struct machine machine;
        long nr_end, nr = open_files_cnt();
@@ -318,7 +318,7 @@ static long new_limit(int count)
        return ret;
 }
 
-int test__dso_data_reopen(struct test *test __maybe_unused, int subtest __maybe_unused)
+static int test__dso_data_reopen(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
        struct machine machine;
        long nr_end, nr = open_files_cnt(), lim = new_limit(3);
@@ -393,3 +393,7 @@ int test__dso_data_reopen(struct test *test __maybe_unused, int subtest __maybe_
        TEST_ASSERT_VAL("failed leaking files", nr == nr_end);
        return 0;
 }
+
+DEFINE_SUITE("DSO data read", dso_data);
+DEFINE_SUITE("DSO data cache", dso_data_cache);
+DEFINE_SUITE("DSO data reopen", dso_data_reopen);