lib/tests/module/gen_test_kallsyms.sh
Source file repositories/reference/linux-study-clean/lib/tests/module/gen_test_kallsyms.sh
File Facts
- System
- Linux kernel
- Corpus path
lib/tests/module/gen_test_kallsyms.sh- Extension
.sh- Size
- 2559 bytes
- Lines
- 135
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/init.hlinux/module.hlinux/printk.h
Detected Declarations
function gen_template_module_headerfunction auto_runtime_testfunction auto_runtime_testfunction auto_runtime_testfunction auto_test_module_initfunction auto_test_module_exitmodule init auto_test_module_init
Annotated Snippet
module_init(auto_test_module_init);
static void __exit auto_test_module_exit(void)
{
}
module_exit(auto_test_module_exit);
MODULE_AUTHOR("Luis Chamberlain <mcgrof@kernel.org>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Test module for kallsyms");
____END_MODULE
}
case $TEST_TYPE in
a)
gen_template_module_header > $TARGET
gen_template_module_data_a $NUM_SYMS >> $TARGET
gen_template_module_exit >> $TARGET
;;
b)
gen_template_module_header > $TARGET
gen_template_module_data_b >> $TARGET
gen_template_module_exit >> $TARGET
;;
c)
gen_template_module_header > $TARGET
gen_template_module_data_c $((NUM_SYMS * SCALE_FACTOR)) >> $TARGET
gen_template_module_exit >> $TARGET
;;
d)
gen_template_module_header > $TARGET
gen_template_module_data_d $((NUM_SYMS * SCALE_FACTOR * 2)) >> $TARGET
gen_template_module_exit >> $TARGET
;;
*)
;;
esac
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/printk.h`.
- Detected declarations: `function gen_template_module_header`, `function auto_runtime_test`, `function auto_runtime_test`, `function auto_runtime_test`, `function auto_test_module_init`, `function auto_test_module_exit`, `module init auto_test_module_init`.
- Atlas domain: Kernel Services / lib.
- Implementation status: integration 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.