LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xcover

eBPF-based functional test coverage profiler that works without instrumenting binaries

TLDR

Start the profiler in daemon mode for a binary
$ xcover run --detach --path /path/to/bin
copy
Wait until it is ready, then run tests
$ /path/to/bin test1
/path/to/bin test2
xcover stop```

**Generate** a JSON coverage report
copy
Check status or stop
$ xcover stop```
copy

SYNOPSIS

xcover <command> [options]

DESCRIPTION

xcover uses kernel eBPF uprobes to trace function calls in any compiled ELF binary (Go, C, Rust, etc.) during test execution. No source changes or recompilation with coverage flags are required.It supports daemon mode so you can start tracing, execute arbitrary test suites or manual runs, then stop and obtain a report of which functions were exercised. Stripped Go binaries can still be symbolized via `.gopclntab`; other stripped binaries can use `--debug-path` for a separate debug file.

PARAMETERS

--path EXEPATH_

ELF executable to profile.
--pid PID
Filter by process ID.
--include / --exclude regex
Include or exclude function symbol names.
--scope binary|project
All functions (default) or only the producing Go module's symbols.
--report
Write JSON coverage report (default true on run).
--debug-path path
Separate debug/symbol file for stripped non-Go binaries.
--detach
Run as a background daemon.

COMMANDS

run

Start profiling. Key flags: `--detach`/`-d`, `--path`/`-p`, `--pid`, `--include`/`--exclude` regexes, `--scope` (`binary` or `project` for Go modules), `--report`, `--debug-path`, `--no-build-id-check`, `--verbose`.
wait
Block until the profiler is fully initialized and tracing.
status
Show whether the profiler daemon is running.
stop
Stop the daemon and finalize results/report (`xcover-report.json` when reporting is enabled).

CAVEATS

- Requires a Linux kernel with eBPF support and appropriate permissions (usually root or CAP_BPF).- Stripped binaries need language-specific fallbacks (`.gopclntab` for Go) or separate debug info.- Measures function coverage at the binary level, not line/branch coverage inside functions.- Single-file `go build main.go` binaries lack module metadata; project scope falls back to binary scope.

SEE ALSO

bpftrace(8), perf(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid