tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc

Source file repositories/reference/linux-study-clean/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
Extension
.tc
Size
389 bytes
Lines
14
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Test failure of registering kprobe on non unique symbol
# requires: kprobe_events

SYMBOL='name_show'

# We skip this test on kernel where SYMBOL is unique or does not exist.
if [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}" /proc/kallsyms)" -le '1' ]; then
	exit_unsupported
fi

! echo "p:test_non_unique ${SYMBOL}" > kprobe_events

Annotation

Implementation Notes