tools/testing/ktest/ktest.pl
Source file repositories/reference/linux-study-clean/tools/testing/ktest/ktest.pl
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/ktest/ktest.pl- Extension
.pl- Size
- 108703 bytes
- Lines
- 4784
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
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.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function get_test_name
Annotated Snippet
if (defined($opt{"LOG_FILE"}) && defined(fileno(LOG))) {
print LOG @_;
}
}
sub logit {
if (defined($opt{"LOG_FILE"})) {
_logit @_;
} else {
print @_;
}
}
sub doprint {
print @_;
_logit @_;
}
sub read_prompt {
my ($cancel, $prompt) = @_;
my $ans;
for (;;) {
if ($cancel) {
print "$prompt [y/n/C] ";
} else {
print "$prompt [Y/n] ";
}
$ans = <STDIN>;
chomp $ans;
if ($ans =~ /^\s*$/) {
if ($cancel) {
$ans = "c";
} else {
$ans = "y";
}
}
last if ($ans =~ /^y$/i || $ans =~ /^n$/i);
if ($cancel) {
last if ($ans =~ /^c$/i);
print "Please answer either 'y', 'n' or 'c'.\n";
} else {
print "Please answer either 'y' or 'n'.\n";
}
}
if ($ans =~ /^c/i) {
exit;
}
if ($ans !~ /^y$/i) {
return 0;
}
return 1;
}
sub read_yn {
my ($prompt) = @_;
return read_prompt 0, $prompt;
}
sub read_ync {
my ($prompt) = @_;
return read_prompt 1, $prompt;
}
sub get_mandatory_config {
my ($config) = @_;
my $ans;
Annotation
- Detected declarations: `function get_test_name`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
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.