HomePhabricator

test: USDT tracepoint interface tests

Description

test: USDT tracepoint interface tests

Summary:

This adds functional tests for the USDT tracepoints added in #22006 and #22902. This partially fixes #23296. The tests are probably skipped on most systems as these tests require:

    a Linux system with a kernel that supports BPF (and available kernel headers)
    that Bitcoin Core is compiled with tracepoints for USDT support (default when compiled with depends)
    bcc installed
    the tests are run with a privileged user that is able to e.g. do BPF syscalls and load BPF maps

Backport of core#24358 and core#25528 for the test fixes.

Depends on D12737.

Note that:

  • We don't run it on CI (yet)
  • We need to prune more blocks to trigger the expected flush event as our block files are smaller
  • The 3 tests succeed on my machine, but the runner returns an error because I got compilation warnings that print to stderr

Test Plan:
With tracing enabled:

sudo ./test/functional/test_runner.py interface_usdt_net
sudo ./test/functional/test_runner.py interface_usdt_utxocache
sudo ./test/functional/test_runner.py interface_usdt_validation

ninja check-functional

Check the tests are skipped as expected when not run as root.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D12739

Details

Provenance
FabienAuthored on Dec 2 2022, 20:35
FabienPushed on Dec 5 2022, 09:18
Reviewer
Restricted Project
Differential Revision
D12739: test: USDT tracepoint interface tests
Parents
rABC1e34d4982100: Move WalletImpl from interfaces/wallet.cpp to wallet/interfaces.cpp
Branches
Unknown
Tags
Unknown