tools/testing/selftests/net/rds/rds_run.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/rds/rds_run.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/rds/rds_run.sh- Extension
.sh- Size
- 8752 bytes
- Lines
- 320
- 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.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
set -e
set -u
unset KBUILD_OUTPUT
current_dir="$(realpath "$(dirname "$0")")"
build_dir="$current_dir"
build_include="$current_dir/include.sh"
if test -f "$build_include"; then
# this include will define "$mk_build_dir" as the location the test was
# built. We will need this if the tests are installed in a location
# other than the kernel source
source "$build_include"
build_dir="$mk_build_dir"
fi
# Source settings for timeout value (also used by ksft runner)
source "$current_dir"/settings
# This test requires kernel source and the *.gcda data therein
# Locate the top level of the kernel source, and the net/rds
# subfolder with the appropriate *.gcno object files
ksrc_dir="$(realpath "$build_dir"/../../../../../)"
kconfig="$ksrc_dir/.config"
obj_dir="$ksrc_dir/net/rds"
GCOV_CMD=gcov
#check to see if the host has the required packages to generate a gcov report
check_gcov_env()
{
if ! which "$GCOV_CMD" > /dev/null 2>&1; then
echo "# Warning: Could not find gcov. "
GENERATE_GCOV_REPORT=0
return
fi
# the gcov version must match the gcc version
GCC_VER=$(gcc -dumpfullversion)
GCOV_VER=$($GCOV_CMD -v | grep gcov | awk '{print $3}'| awk 'BEGIN {FS="-"}{print $1}')
if [ "$GCOV_VER" != "$GCC_VER" ]; then
#attempt to find a matching gcov version
GCOV_CMD=gcov-$(gcc -dumpversion)
if ! which "$GCOV_CMD" > /dev/null 2>&1; then
echo "# Warning: Could not find an appropriate gcov installation. \
gcov version must match gcc version"
GENERATE_GCOV_REPORT=0
return
fi
#recheck version number of found gcov executable
GCOV_VER=$($GCOV_CMD -v | grep gcov | awk '{print $3}'| \
awk 'BEGIN {FS="-"}{print $1}')
if [ "$GCOV_VER" != "$GCC_VER" ]; then
echo "# Warning: Could not find an appropriate gcov installation. \
gcov version must match gcc version"
GENERATE_GCOV_REPORT=0
else
echo "# Warning: Mismatched gcc and gcov detected. Using $GCOV_CMD"
fi
fi
}
# Check to see if the kconfig has the required configs to generate a coverage report
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
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.