perf test: Rename struct test to test_suite

This is to align with kunit's terminology.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: Daniel Latypov <dlatypov@google.com>
Cc: David Gow <davidgow@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20211104064208.3156807-6-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Ian Rogers
2021-11-13 10:32:22 -03:00
committed by Arnaldo Carvalho de Melo
parent d68f036508
commit 33f44bfd3c
81 changed files with 125 additions and 123 deletions
+1 -1
View File
@@ -2,6 +2,6 @@
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H
extern struct test *arch_tests[];
extern struct test_suite *arch_tests[];
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#include "tests/tests.h"
#include "arch-tests.h"
struct test *arch_tests[] = {
struct test_suite *arch_tests[] = {
#ifdef HAVE_DWARF_UNWIND_SUPPORT
&suite__dwarf_unwind,
#endif
+1 -1
View File
@@ -9,7 +9,7 @@
#define VECTORS__MAP_NAME "[vectors]"
static int test__vectors_page(struct test *test __maybe_unused, int subtest __maybe_unused)
static int test__vectors_page(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
void *start, *end;
+1 -1
View File
@@ -2,6 +2,6 @@
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H
extern struct test *arch_tests[];
extern struct test_suite *arch_tests[];
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#include "tests/tests.h"
#include "arch-tests.h"
struct test *arch_tests[] = {
struct test_suite *arch_tests[] = {
#ifdef HAVE_DWARF_UNWIND_SUPPORT
&suite__dwarf_unwind,
#endif
+1 -1
View File
@@ -2,6 +2,6 @@
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H
extern struct test *arch_tests[];
extern struct test_suite *arch_tests[];
#endif
+2 -1
View File
@@ -3,7 +3,8 @@
#include "tests/tests.h"
#include "arch-tests.h"
struct test *arch_tests[] = {
struct test_suite *arch_tests[] = {
#ifdef HAVE_DWARF_UNWIND_SUPPORT
&suite__dwarf_unwind,
#endif
+7 -7
View File
@@ -2,15 +2,15 @@
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H
struct test;
struct test_suite;
/* Tests */
int test__rdpmc(struct test *test, int subtest);
int test__insn_x86(struct test *test, int subtest);
int test__intel_pt_pkt_decoder(struct test *test, int subtest);
int test__bp_modify(struct test *test, int subtest);
int test__x86_sample_parsing(struct test *test, int subtest);
int test__rdpmc(struct test_suite *test, int subtest);
int test__insn_x86(struct test_suite *test, int subtest);
int test__intel_pt_pkt_decoder(struct test_suite *test, int subtest);
int test__bp_modify(struct test_suite *test, int subtest);
int test__x86_sample_parsing(struct test_suite *test, int subtest);
extern struct test *arch_tests[];
extern struct test_suite *arch_tests[];
#endif
+1 -1
View File
@@ -13,7 +13,7 @@ DEFINE_SUITE("x86 bp modify", bp_modify);
#endif
DEFINE_SUITE("x86 Sample parsing", x86_sample_parsing);
struct test *arch_tests[] = {
struct test_suite *arch_tests[] = {
&suite__rdpmc,
#ifdef HAVE_DWARF_UNWIND_SUPPORT
&suite__dwarf_unwind,
+1 -1
View File
@@ -204,7 +204,7 @@ out:
return rip == (unsigned long) bp_1 ? TEST_OK : TEST_FAIL;
}
int test__bp_modify(struct test *test __maybe_unused,
int test__bp_modify(struct test_suite *test __maybe_unused,
int subtest __maybe_unused)
{
TEST_ASSERT_VAL("modify test 1 failed\n", !bp_modify1());
+1 -1
View File
@@ -173,7 +173,7 @@ static int test_data_set(struct test_data *dat_set, int x86_64)
* verbose (-v) option to see all the instructions and whether or not they
* decoded successfully.
*/
int test__insn_x86(struct test *test __maybe_unused, int subtest __maybe_unused)
int test__insn_x86(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
int ret = 0;
+1 -1
View File
@@ -37,7 +37,7 @@ static pid_t spawn(void)
* the last read counter value to avoid triggering a WARN_ON_ONCE() in
* smp_call_function_many() caused by sending IPIs from NMI context.
*/
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
int test__intel_cqm_count_nmi_context(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
struct evlist *evlist = NULL;
struct evsel *evsel = NULL;
@@ -289,7 +289,7 @@ static int test_one(struct test_data *d)
* This test feeds byte sequences to the Intel PT packet decoder and checks the
* results. Changes to the packet context are also checked.
*/
int test__intel_pt_pkt_decoder(struct test *test __maybe_unused, int subtest __maybe_unused)
int test__intel_pt_pkt_decoder(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
struct test_data *d = data;
int ret;
+1 -1
View File
@@ -157,7 +157,7 @@ out_close:
return 0;
}
int test__rdpmc(struct test *test __maybe_unused, int subtest __maybe_unused)
int test__rdpmc(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
int status = 0;
int wret = 0;
+1 -1
View File
@@ -115,7 +115,7 @@ out_free:
* For now, the PERF_SAMPLE_WEIGHT_STRUCT is the only X86 specific sample type.
* The test only checks the PERF_SAMPLE_WEIGHT_STRUCT type.
*/
int test__x86_sample_parsing(struct test *test __maybe_unused, int subtest __maybe_unused)
int test__x86_sample_parsing(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
return do_test(PERF_SAMPLE_WEIGHT_STRUCT);
}
+1 -1
View File
@@ -289,7 +289,7 @@ static int test_get_dec(void)
return ret;
}
static int test__api_io(struct test *test __maybe_unused,
static int test__api_io(struct test_suite *test __maybe_unused,
int subtest __maybe_unused)
{
int ret = 0;
+1 -1
View File
@@ -178,7 +178,7 @@ static int run_dir(const char *d, const char *perf)
return system(cmd) ? TEST_FAIL : TEST_OK;
}
static int test__attr(struct test *test __maybe_unused, int subtest __maybe_unused)
static int test__attr(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
struct stat st;
char path_perf[PATH_MAX];
+1 -1
View File
@@ -82,7 +82,7 @@ static int do_test(struct evlist *evlist, int mmap_pages,
}
static int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __maybe_unused)
static int test__backward_ring_buffer(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
int ret = TEST_SKIP, err, sample_count = 0, comm_count = 0;
char pid[16], sbuf[STRERR_BUFSIZE];
+1 -1
View File
@@ -40,7 +40,7 @@ static int test_bitmap(const char *str)
return ret;
}
static int test__bitmap_print(struct test *test __maybe_unused, int subtest __maybe_unused)
static int test__bitmap_print(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
TEST_ASSERT_VAL("failed to convert map", test_bitmap("1"));
TEST_ASSERT_VAL("failed to convert map", test_bitmap("1,5"));
+2 -2
View File
@@ -173,7 +173,7 @@ static int detect_share(int wp_cnt, int bp_cnt)
* we create another watchpoint to ensure
* the slot accounting is correct
*/
static int test__bp_accounting(struct test *test __maybe_unused, int subtest __maybe_unused)
static int test__bp_accounting(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
{
int has_ioctl = detect_ioctl();
int wp_cnt = detect_cnt(false);
@@ -205,7 +205,7 @@ static bool test__bp_account_is_supported(void)
#endif
}
struct test suite__bp_accounting = {
struct test_suite suite__bp_accounting = {
.desc = "Breakpoint accounting",
.func = test__bp_accounting,
.is_supported = test__bp_account_is_supported,

Some files were not shown because too many files have changed in this diff Show More