tools/testing/kunit/kunit-completion.sh
Source file repositories/reference/linux-study-clean/tools/testing/kunit/kunit-completion.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/kunit/kunit-completion.sh- Extension
.sh- Size
- 874 bytes
- Lines
- 35
- 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
# SPDX-License-Identifier: GPL-2.0
# bash completion support for KUnit
_kunit_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
_kunit()
{
local cur prev words cword
_init_completion || return
local script="${_kunit_dir}/kunit.py"
if [[ $cword -eq 1 && "$cur" != -* ]]; then
local cmds=$(${script} --list-cmds 2>/dev/null)
COMPREPLY=($(compgen -W "${cmds}" -- "$cur"))
return 0
fi
if [[ "$cur" == -* ]]; then
if [[ -n "${words[1]}" && "${words[1]}" != -* ]]; then
local opts=$(${script} ${words[1]} --list-opts 2>/dev/null)
COMPREPLY=($(compgen -W "${opts}" -- "$cur"))
return 0
else
local opts=$(${script} --list-opts 2>/dev/null)
COMPREPLY=($(compgen -W "${opts}" -- "$cur"))
return 0
fi
fi
}
complete -o default -F _kunit kunit.py
complete -o default -F _kunit kunit
complete -o default -F _kunit ./tools/testing/kunit/kunit.py
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.