lib/tests/liveupdate.c
Source file repositories/reference/linux-study-clean/lib/tests/liveupdate.c
File Facts
- System
- Linux kernel
- Corpus path
lib/tests/liveupdate.c- Extension
.c- Size
- 3577 bytes
- Lines
- 144
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cleanup.hlinux/errno.hlinux/init.hlinux/liveupdate.hlinux/module.h../../kernel/liveupdate/luo_internal.h
Detected Declarations
function test_flb_preservefunction test_flb_unpreservefunction test_flb_retrievefunction test_flb_finishfunction liveupdate_test_initfunction liveupdate_test_register
Annotated Snippet
if (err && err != -ENODATA && err != -ENOENT) {
pr_err("liveupdate_flb_get_incoming for %s failed: %pe\n",
flb->compatible, ERR_PTR(err));
}
if (!err)
liveupdate_flb_put_incoming(flb);
}
initialized = true;
}
void liveupdate_test_register(struct liveupdate_file_handler *fh)
{
int err, i;
liveupdate_test_init();
for (i = 0; i < TEST_NFLBS; i++) {
struct liveupdate_flb *flb = &test_flbs[i];
err = liveupdate_register_flb(fh, flb);
if (err) {
pr_err("Failed to register %s %pe\n",
flb->compatible, ERR_PTR(err));
}
}
err = liveupdate_register_flb(fh, &test_flbs[0]);
if (!err || err != -EEXIST) {
pr_err("Failed: %s should be already registered, but got err: %pe\n",
test_flbs[0].compatible, ERR_PTR(err));
}
pr_info("Registered %d FLBs with file handler: [%s]\n",
TEST_NFLBS, fh->compatible);
}
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Pasha Tatashin <pasha.tatashin@soleen.com>");
MODULE_DESCRIPTION("In-kernel test for LUO mechanism");
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/errno.h`, `linux/init.h`, `linux/liveupdate.h`, `linux/module.h`, `../../kernel/liveupdate/luo_internal.h`.
- Detected declarations: `function test_flb_preserve`, `function test_flb_unpreserve`, `function test_flb_retrieve`, `function test_flb_finish`, `function liveupdate_test_init`, `function liveupdate_test_register`.
- Atlas domain: Kernel Services / lib.
- 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.