tools/testing/selftests/bpf/prog_tests/test_struct_ops_multi_pages.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/prog_tests/test_struct_ops_multi_pages.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/prog_tests/test_struct_ops_multi_pages.c- Extension
.c- Size
- 799 bytes
- Lines
- 31
- 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.hstruct_ops_multi_pages.skel.h
Detected Declarations
function do_struct_ops_multi_pagesfunction test_struct_ops_multi_pages
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */
#include <test_progs.h>
#include "struct_ops_multi_pages.skel.h"
static void do_struct_ops_multi_pages(void)
{
struct struct_ops_multi_pages *skel;
struct bpf_link *link;
/* The size of all trampolines of skel->maps.multi_pages should be
* over 1 page (at least for x86).
*/
skel = struct_ops_multi_pages__open_and_load();
if (!ASSERT_OK_PTR(skel, "struct_ops_multi_pages_open_and_load"))
return;
link = bpf_map__attach_struct_ops(skel->maps.multi_pages);
ASSERT_OK_PTR(link, "attach_multi_pages");
bpf_link__destroy(link);
struct_ops_multi_pages__destroy(skel);
}
void test_struct_ops_multi_pages(void)
{
if (test__start_subtest("multi_pages"))
do_struct_ops_multi_pages();
}
Annotation
- Immediate include surface: `test_progs.h`, `struct_ops_multi_pages.skel.h`.
- Detected declarations: `function do_struct_ops_multi_pages`, `function test_struct_ops_multi_pages`.
- 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.