tools/testing/selftests/kvm/s390/resets.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/kvm/s390/resets.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/kvm/s390/resets.c- Extension
.c- Size
- 8387 bytes
- Lines
- 314
- 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
stdio.hstdlib.hstring.hsys/ioctl.htest_util.hkvm_util.hkselftest.h
Detected Declarations
struct testdeffunction guest_code_initialfunction test_one_regfunction assert_noirqfunction assert_clearfunction assert_initial_noclearfunction assert_initialfunction assert_normal_noclearfunction assert_normalfunction inject_irqfunction test_normalfunction test_initialfunction test_clearfunction main
Annotated Snippet
struct testdef {
const char *name;
void (*test)(void);
bool needs_cap;
} testlist[] = {
{ "initial", test_initial, false },
{ "normal", test_normal, true },
{ "clear", test_clear, true },
};
int main(int argc, char *argv[])
{
bool has_s390_vcpu_resets = kvm_check_cap(KVM_CAP_S390_VCPU_RESETS);
int idx;
ksft_print_header();
ksft_set_plan(ARRAY_SIZE(testlist));
for (idx = 0; idx < ARRAY_SIZE(testlist); idx++) {
if (!testlist[idx].needs_cap || has_s390_vcpu_resets) {
testlist[idx].test();
ksft_test_result_pass("%s\n", testlist[idx].name);
} else {
ksft_test_result_skip("%s - no VCPU_RESETS capability\n",
testlist[idx].name);
}
}
ksft_finished(); /* Print results and exit() accordingly */
}
Annotation
- Immediate include surface: `stdio.h`, `stdlib.h`, `string.h`, `sys/ioctl.h`, `test_util.h`, `kvm_util.h`, `kselftest.h`.
- Detected declarations: `struct testdef`, `function guest_code_initial`, `function test_one_reg`, `function assert_noirq`, `function assert_clear`, `function assert_initial_noclear`, `function assert_initial`, `function assert_normal_noclear`, `function assert_normal`, `function inject_irq`.
- 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.