tools/unittests/kdoc-test.yaml
Source file repositories/reference/linux-study-clean/tools/unittests/kdoc-test.yaml
File Facts
- System
- Linux kernel
- Corpus path
tools/unittests/kdoc-test.yaml- Extension
.yaml- Size
- 52252 bytes
- Lines
- 1699
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct kcovstruct kcovstruct kcovfunction func1function func2function prepare_report_consumerfunction tcp_sigpool_startfunction undo_report_consumerfunction debugfs_enter_cancellationfunction debugfs_leave_cancellationfunction acpi_os_acquire_lockfunction acpi_os_release_lockfunction txfunction contend_for_bmfunction prepare_report_producerfunction __crypto_alg_lookupfunction tomoyo_read_lockfunction tomoyo_read_unlockfunction tomoyo_read_lockexport func2
Annotated Snippet
struct kcov {
/**
* @refcount: Reference counter. We keep one for:
* - opened file descriptor
* - task with enabled coverage (we can't unwire it from another task)
* - each code section for remote coverage collection
*/
refcount_t refcount;
/**
* @lock: The lock protects mode, size, area and t.
*/
spinlock_t lock;
/**
* @mode: the kcov_mode
*/
enum kcov_mode mode __guarded_by(&lock);
/**
* @size: Size of arena (in long's).
*/
unsigned int size __guarded_by(&lock);
/**
* @area: Coverage buffer shared with user space.
*/
void *area __guarded_by(&lock);
/**
* @t: Task for which we collect coverage, or NULL.
*/
struct task_struct *t __guarded_by(&lock);
/**
* @remote: Collecting coverage from remote (background) threads.
*/
bool remote;
/**
* @remote_size: Size of remote area (in long's).
*/
unsigned int remote_size;
/**
* @sequence: Sequence is incremented each time kcov is reenabled,
* used by kcov_remote_stop(), see the comment there.
*/
int sequence;
};
expected:
- man: |
.TH "struct kcov" 9 "February 2026" "mock_tests" "Kernel API Manual"
.SH NAME
struct kcov \- kcov descriptor (one per opened debugfs file). State transitions of the descriptor:
.SH SYNOPSIS
struct kcov {
.br
.BI " refcount_t refcount;"
.br
.BI " spinlock_t lock;"
.br
.BI " enum kcov_mode mode;"
.br
.BI " unsigned int size;"
.br
.BI " void *area;"
.br
.BI " struct task_struct *t;"
.br
.BI " bool remote;"
.br
.BI " unsigned int remote_size;"
.br
.BI " int sequence;"
.br
.BI "
};
Annotation
- Detected declarations: `struct kcov`, `struct kcov`, `struct kcov`, `function func1`, `function func2`, `function prepare_report_consumer`, `function tcp_sigpool_start`, `function undo_report_consumer`, `function debugfs_enter_cancellation`, `function debugfs_leave_cancellation`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.