tools/testing/selftests/bpf/prog_tests/core_kern.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/prog_tests/core_kern.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/prog_tests/core_kern.c- Extension
.c- Size
- 717 bytes
- Lines
- 29
- 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
test_progs.hcore_kern.lskel.h
Detected Declarations
function test_core_kern_lskel
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2021 Facebook */
#include "test_progs.h"
#include "core_kern.lskel.h"
void test_core_kern_lskel(void)
{
struct core_kern_lskel *skel;
int link_fd;
skel = core_kern_lskel__open_and_load();
if (!ASSERT_OK_PTR(skel, "open_and_load"))
return;
link_fd = core_kern_lskel__core_relo_proto__attach(skel);
if (!ASSERT_GT(link_fd, 0, "attach(core_relo_proto)"))
goto cleanup;
/* trigger tracepoints */
usleep(1);
ASSERT_TRUE(skel->bss->proto_out[0], "bpf_core_type_exists");
ASSERT_FALSE(skel->bss->proto_out[1], "!bpf_core_type_exists");
ASSERT_TRUE(skel->bss->proto_out[2], "bpf_core_type_exists. nested");
cleanup:
core_kern_lskel__destroy(skel);
}
Annotation
- Immediate include surface: `test_progs.h`, `core_kern.lskel.h`.
- Detected declarations: `function test_core_kern_lskel`.
- 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.