tools/testing/selftests/bpf/prog_tests/timer_start_deadlock.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/prog_tests/timer_start_deadlock.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/prog_tests/timer_start_deadlock.c- Extension
.c- Size
- 900 bytes
- Lines
- 34
- 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.htimer_start_deadlock.skel.h
Detected Declarations
function test_timer_start_deadlock
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */
#include <test_progs.h>
#include "timer_start_deadlock.skel.h"
void test_timer_start_deadlock(void)
{
struct timer_start_deadlock *skel;
int err, prog_fd;
LIBBPF_OPTS(bpf_test_run_opts, opts);
skel = timer_start_deadlock__open_and_load();
if (!ASSERT_OK_PTR(skel, "skel_open_and_load"))
return;
err = timer_start_deadlock__attach(skel);
if (!ASSERT_OK(err, "skel_attach"))
goto cleanup;
prog_fd = bpf_program__fd(skel->progs.start_timer);
/*
* Run the syscall program that attempts to deadlock.
* If the kernel deadlocks, this call will never return.
*/
err = bpf_prog_test_run_opts(prog_fd, &opts);
ASSERT_OK(err, "prog_test_run");
ASSERT_EQ(opts.retval, 0, "prog_retval");
ASSERT_EQ(skel->bss->tp_called, 1, "tp_called");
cleanup:
timer_start_deadlock__destroy(skel);
}
Annotation
- Immediate include surface: `test_progs.h`, `timer_start_deadlock.skel.h`.
- Detected declarations: `function test_timer_start_deadlock`.
- 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.