tools/testing/selftests/drivers/net/netconsole/netcons_sysdata.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/drivers/net/netconsole/netcons_sysdata.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/drivers/net/netconsole/netcons_sysdata.sh- Extension
.sh- Size
- 7332 bytes
- Lines
- 273
- 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
function set_cpu_nrfunction validate_releasefunction validate_no_sysdata
Annotated Snippet
function set_cpu_nr() {
if [[ ! -f "${NETCONS_PATH}/userdata/cpu_nr_enabled" ]]
then
echo "Populate CPU configfs path not available in ${NETCONS_PATH}/userdata/cpu_nr_enabled" >&2
exit "${ksft_skip}"
fi
echo 1 > "${NETCONS_PATH}/userdata/cpu_nr_enabled"
}
# Enable the taskname to be appended to sysdata
function set_taskname() {
if [[ ! -f "${NETCONS_PATH}/userdata/taskname_enabled" ]]
then
echo "Not able to enable taskname sysdata append. Configfs not available in ${NETCONS_PATH}/userdata/taskname_enabled" >&2
exit "${ksft_skip}"
fi
echo 1 > "${NETCONS_PATH}/userdata/taskname_enabled"
}
# Enable the release to be appended to sysdata
function set_release() {
if [[ ! -f "${NETCONS_PATH}/userdata/release_enabled" ]]
then
echo "Not able to enable release sysdata append. Configfs not available in ${NETCONS_PATH}/userdata/release_enabled" >&2
exit "${ksft_skip}"
fi
echo 1 > "${NETCONS_PATH}/userdata/release_enabled"
}
# Enable the msgid to be appended to sysdata
function set_msgid() {
if [[ ! -f "${NETCONS_PATH}/userdata/msgid_enabled" ]]
then
echo "Not able to enable msgid sysdata append. Configfs not available in ${NETCONS_PATH}/userdata/msgid_enabled" >&2
exit "${ksft_skip}"
fi
echo 1 > "${NETCONS_PATH}/userdata/msgid_enabled"
}
# Disable the sysdata cpu_nr feature
function unset_cpu_nr() {
echo 0 > "${NETCONS_PATH}/userdata/cpu_nr_enabled"
}
# Once called, taskname=<..> will not be appended anymore
function unset_taskname() {
echo 0 > "${NETCONS_PATH}/userdata/taskname_enabled"
}
function unset_release() {
echo 0 > "${NETCONS_PATH}/userdata/release_enabled"
}
function unset_msgid() {
echo 0 > "${NETCONS_PATH}/userdata/msgid_enabled"
}
# Test if MSG contains sysdata
function validate_sysdata() {
# OUTPUT_FILE will contain something like:
# 6.11.1-0_fbk0_rc13_509_g30d75cea12f7,13,1822,115075213798,-;netconsole selftest: netcons_gtJHM
# userdatakey=userdatavalue
# cpu=X
# taskname=<taskname>
# msgid=<id>
Annotation
- Detected declarations: `function set_cpu_nr`, `function validate_release`, `function validate_no_sysdata`.
- 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.