tools/testing/selftests/kvm/include/kvm_test_harness.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/kvm/include/kvm_test_harness.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/kvm/include/kvm_test_harness.h- Extension
.h- Size
- 891 bytes
- Lines
- 37
- 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
kselftest_harness.h
Detected Declarations
function Copyright
Annotated Snippet
#ifndef SELFTEST_KVM_TEST_HARNESS_H
#define SELFTEST_KVM_TEST_HARNESS_H
#include "kselftest_harness.h"
#define KVM_ONE_VCPU_TEST_SUITE(name) \
FIXTURE(name) { \
struct kvm_vcpu *vcpu; \
}; \
\
FIXTURE_SETUP(name) { \
(void)vm_create_with_one_vcpu(&self->vcpu, NULL); \
} \
\
FIXTURE_TEARDOWN(name) { \
kvm_vm_free(self->vcpu->vm); \
}
#define KVM_ONE_VCPU_TEST(suite, test, guestcode) \
static void __suite##_##test(struct kvm_vcpu *vcpu); \
\
TEST_F(suite, test) \
{ \
vcpu_arch_set_entry_point(self->vcpu, guestcode); \
__suite##_##test(self->vcpu); \
} \
static void __suite##_##test(struct kvm_vcpu *vcpu)
#endif /* SELFTEST_KVM_TEST_HARNESS_H */
Annotation
- Immediate include surface: `kselftest_harness.h`.
- Detected declarations: `function Copyright`.
- 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.