Skip to content

tracing: tests for USDT tracepoints  #23296

@0xB10C

Description

@0xB10C

#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:

  1. We currently only support the tracepoints on Linux. The tests should be skipped on other operating systems.
  2. 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 capability CAP_SYS_ADMIN is required. Functional tests shouldn't require CAP_SYS_ADMIN as that essentially means running the test suite with root privileges.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions