#22006 added the first three USDT based tracepoints to Bitcoin Core. To provide a semi-stable tracepoint API the tracepoints need test coverage. The tracepoints can be tested in the functional tests using the Python wrapper of BCC.
Before adding more tracepoints, the existing three tracepoints from #22006 should be tested.
Notes:
- We currently only support the tracepoints on Linux. The tests should be skipped on other operating systems.
- Hooking into the tracepoints via the Linux kernel requires special privileges. Since kernel version 5.8. (Aug. 2020) the
CAP_BPF
can be used. On older kernel version the overloaded catch-all capabilityCAP_SYS_ADMIN
is required. Functional tests shouldn’t requireCAP_SYS_ADMIN
as that essentially means running the test suite withroot
privileges. - The tests require the BCC Python library. This should be an optional dependency. Tests should be skipped if the dependency isn’t present.
The connect_block
tracepoint can be tested by mining blocks with transactions and checking that the tracepoint passes the correct data. The net
inbound_message
and outbound_message
tracepoints can be tested by checking the traffic between two nodes.