tools/perf/tests/tests.h
Source file repositories/reference/linux-study-clean/tools/perf/tests/tests.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/tests/tests.h- Extension
.h- Size
- 6413 bytes
- Lines
- 253
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdbool.hutil/debug.h
Detected Declarations
struct test_suitestruct test_casestruct test_suitestruct threadstruct perf_samplestruct test_workload
Annotated Snippet
struct test_case {
const char *name;
const char *desc;
const char *skip_reason;
test_fnptr run_case;
bool exclusive;
};
struct test_suite {
const char *desc;
struct test_case *test_cases;
void *priv;
};
#define DECLARE_SUITE(name) \
extern struct test_suite suite__##name;
#define TEST_CASE(description, _name) \
{ \
.name = #_name, \
.desc = description, \
.run_case = test__##_name, \
}
#define TEST_CASE_REASON(description, _name, _reason) \
{ \
.name = #_name, \
.desc = description, \
.run_case = test__##_name, \
.skip_reason = _reason, \
}
#define TEST_CASE_EXCLUSIVE(description, _name) \
{ \
.name = #_name, \
.desc = description, \
.run_case = test__##_name, \
.exclusive = true, \
}
#define TEST_CASE_REASON_EXCLUSIVE(description, _name, _reason) \
{ \
.name = #_name, \
.desc = description, \
.run_case = test__##_name, \
.skip_reason = _reason, \
.exclusive = true, \
}
#define DEFINE_SUITE(description, _name) \
struct test_case tests__##_name[] = { \
TEST_CASE(description, _name), \
{ .name = NULL, } \
}; \
struct test_suite suite__##_name = { \
.desc = description, \
.test_cases = tests__##_name, \
}
#define DEFINE_SUITE_EXCLUSIVE(description, _name) \
struct test_case tests__##_name[] = { \
TEST_CASE_EXCLUSIVE(description, _name),\
{ .name = NULL, } \
}; \
struct test_suite suite__##_name = { \
.desc = description, \
.test_cases = tests__##_name, \
}
/* Tests */
DECLARE_SUITE(vmlinux_matches_kallsyms);
DECLARE_SUITE(openat_syscall_event);
DECLARE_SUITE(openat_syscall_event_on_all_cpus);
DECLARE_SUITE(basic_mmap);
DECLARE_SUITE(PERF_RECORD);
DECLARE_SUITE(perf_evsel__roundtrip_name_test);
DECLARE_SUITE(perf_evsel__tp_sched_test);
DECLARE_SUITE(syscall_openat_tp_fields);
DECLARE_SUITE(pmu);
DECLARE_SUITE(pmu_events);
DECLARE_SUITE(hwmon_pmu);
DECLARE_SUITE(tool_pmu);
DECLARE_SUITE(attr);
DECLARE_SUITE(dso_data);
DECLARE_SUITE(dso_data_cache);
DECLARE_SUITE(dso_data_reopen);
DECLARE_SUITE(parse_events);
DECLARE_SUITE(hists_link);
DECLARE_SUITE(bp_signal);
DECLARE_SUITE(bp_signal_overflow);
Annotation
- Immediate include surface: `stdbool.h`, `util/debug.h`.
- Detected declarations: `struct test_suite`, `struct test_case`, `struct test_suite`, `struct thread`, `struct perf_sample`, `struct test_workload`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.